Improve npm scripts consistency

Closes #255
This commit is contained in:
Farkas József
2017-02-13 23:10:22 +01:00
parent 846fd8941e
commit 61c20cd678
3 changed files with 11 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ First up, make sure that node >=4.x.x and npm >=3.x.x are installed on your syst
git clone git@github.com:UltimateHackingKeyboard/agent.git
cd agent
npm install
npm run dev
npm run server:web
```
At this point, webpack dev server should expose Agent at `localhost:8080`

View File

@@ -21,7 +21,9 @@ function createWindow() {
const indexPath = path.resolve(__dirname, './index.html');
// and load the index.html of the app.
win.loadURL(`file://${indexPath}`);
const url = process.argv[2] && process.argv[2].startsWith('--url=') ? process.argv[2].substring(6) : `file://${indexPath}`;
win.loadURL(url);
win.on('page-title-updated', (event) => {
event.preventDefault();

View File

@@ -63,9 +63,9 @@
},
"scripts": {
"postinstall": "run-p build:usb \"symlink -- -i\" ",
"tslint": "tslint \"electron/**/*.ts\" \"web/**/*.ts\" \"shared/**/*.ts\" \"test-serializer/**/*.ts\"",
"stylelint": "stylelint \"electron/**/*.scss\" \"web/**/*.scss\" \"shared/**/*.scss\" --syntax scss",
"lint": "run-s -scn tslint stylelint",
"lint": "run-s -scn lint:ts lint:style",
"lint:ts": "tslint \"electron/**/*.ts\" \"web/**/*.ts\" \"shared/**/*.ts\" \"test-serializer/**/*.ts\"",
"lint:style": "stylelint \"electron/**/*.scss\" \"web/**/*.scss\" \"shared/**/*.scss\" --syntax scss",
"build": "run-p build:web build:electron",
"build:web": "webpack --config \"web/src/webpack.config.js\"",
"build:electron": "run-s -scn build:electron:main build:electron:app",
@@ -73,8 +73,10 @@
"build:electron:app": "webpack --config \"electron/src/webpack.config.js\"",
"build:usb": "electron-rebuild -w usb -p",
"build:test": "webpack --config \"test-serializer/webpack.config.js\"",
"dev": "webpack-dev-server --config \"web/src/webpack.config.js\" --content-base \"./web/dist\"",
"electron": "electron electron/dist/electron-main.js",
"server:web": "webpack-dev-server --config \"web/src/webpack.config.js\" --content-base \"./web/dist\"",
"server:electron": "webpack-dev-server --config \"electron/src/webpack.config.js\" --content-base \"./electron/dist\" --port 8081",
"electron:dev": "electron electron/dist/electron-main.js --url=http://localhost:8081",
"electron:prod": "electron electron/dist/electron-main.js",
"symlink": "node ./tools/symlinker"
}
}