don't hook on postinstall, current dev cycle uses (abuses) npm i to build

so no point making it take longer than it has to for the devs only testing
webapp

build:electron - hook npm run install:electron
install:electron - run npm i for the electron deps
electron - start the app locally for testing

add to README

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/3622/head
Michael Telatynski 2017-04-23 22:50:58 +01:00
parent 3fb54029d7
commit 9e2324fb69
2 changed files with 4 additions and 2 deletions

View File

@ -135,6 +135,7 @@ To run as a desktop app:
``` ```
npm install electron npm install electron
npm run install:electron
node_modules/.bin/electron . node_modules/.bin/electron .
``` ```

View File

@ -32,11 +32,12 @@
"build:compile": "babel --source-maps -d lib src", "build:compile": "babel --source-maps -d lib src",
"build:bundle": "NODE_ENV=production webpack -p --progress", "build:bundle": "NODE_ENV=production webpack -p --progress",
"build:bundle:dev": "webpack --optimize-occurence-order --progress", "build:bundle:dev": "webpack --optimize-occurence-order --progress",
"build:electron": "npm run clean && npm run build && build -wml --ia32 --x64", "build:electron": "npm run clean && npm run build && npm run install:electron && build -wml --ia32 --x64",
"build": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle", "build": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle",
"build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev", "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev",
"dist": "scripts/package.sh", "dist": "scripts/package.sh",
"postinstall": "cd electron && npm i", "install:electron": "cd electron && npm i",
"electron": "npm run install:electron && electron .",
"start:res": "node scripts/copy-res.js -w", "start:res": "node scripts/copy-res.js -w",
"start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-file=bundles/_dev_/[name].js -w --progress", "start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-file=bundles/_dev_/[name].js -w --progress",
"start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress", "start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress",