From 2cff17cd5d9bd47687612c5417c59d90e393c83b Mon Sep 17 00:00:00 2001 From: lesleyrs <19632758+lesleyrs@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:07:21 +0200 Subject: [PATCH] fix: unnecessary run scripts warnings (#20) * fix warnings * check for github CI seems to wor, allows local prod build * remove double asc --- package.json | 7 +++---- webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2e28380e..25e69e7d 100644 --- a/package.json +++ b/package.json @@ -41,14 +41,14 @@ "build": "npm run asc && webpack --mode=production --node-env=production", "build:dev": "npm run asc && webpack --mode=development", "build:prod": "npm run asc && webpack --mode=production --node-env=production", - "dev": "npm run asc && webpack-dev-server --hot --watch", + "dev": "npm run asc && webpack-dev-server --hot", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "format": "prettier src/**/*.{js,ts} --write", "prepare": "husky install", "test": "npm run asc && jest", "asc": "asc --target release --optimizeLevel 3 --converge", - "local": "npm run asc && npm run build:dev && npx serve public" + "local": "npm run build:dev && npx serve public" }, "repository": { "type": "git", @@ -68,8 +68,7 @@ "lint-staged": { "src/**/*.{js,ts}": [ "npm run format", - "npm run lint:fix", - "git add" + "npm run lint:fix" ] } } diff --git a/webpack.config.js b/webpack.config.js index 2c8574f9..ca7e3f21 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -56,7 +56,7 @@ const config = { output: { path: path.resolve(__dirname, 'public'), - publicPath: isProduction ? '/Client2/' : '/' // used for GitHub Pages, maybe control via env var? + publicPath: process.env.CI ? '/Client2/' : '/' }, devServer: {