From 7e28865a73405708b2faf43136a718028e5f7c98 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Sun, 13 Jan 2019 03:13:00 +0100 Subject: [PATCH] Improve build --- app/package.json | 3 +-- build.ts | 16 +++++++++++++--- package.json | 3 ++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/package.json b/app/package.json index 88ad967..13bc325 100644 --- a/app/package.json +++ b/app/package.json @@ -4,8 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "build": "webpack --mode production", - "postinstall": "npm run build" + "build": "webpack --mode production" }, "author": "", "license": "ISC", diff --git a/build.ts b/build.ts index 5ac8c8a..9dee44d 100644 --- a/build.ts +++ b/build.ts @@ -31,9 +31,19 @@ const mac: builder.CliOptions = { } async function buildAll() { -// await builder.build(linux) -// await builder.build(win) - await builder.build(mac) + switch (process.argv[2]) { + case 'win': + await builder.build(win) + break + case 'linux': + await builder.build(linux) + break + case 'mac': + await builder.build(mac) + break + default: + await builder.build(mac) + } } buildAll() diff --git a/package.json b/package.json index 030e41e..2c9683e 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "electron.js", "scripts": { "start": "electron .", + "install": "cd app; npm install; cd ..", "test": "npm run test-backend", "build": "cd app; npm run build; cd ..; cd backend; npm run build; cd ..", "test-backend": "cd backend && npm run test && cd ..", @@ -16,7 +17,7 @@ }, "build": { "appId": "mqtt-explorer", - "nodeGypRebuild": true, + "nodeGypRebuild": false, "mac": { "category": "de.t7n.apps.mq-explorer", "publish": [