From 9e2324fb69342897d3a95fa4bf8a9d95dae66be0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 23 Apr 2017 22:50:58 +0100 Subject: [PATCH] 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> --- README.md | 1 + package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d7ab81b8a..7bef64783d 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ To run as a desktop app: ``` npm install electron + npm run install:electron node_modules/.bin/electron . ``` diff --git a/package.json b/package.json index dc1e3bea96..a64d0d9ea3 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,12 @@ "build:compile": "babel --source-maps -d lib src", "build:bundle": "NODE_ENV=production webpack -p --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:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev", "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: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",