Improve build

This commit is contained in:
Thomas Nordquist
2019-01-13 03:13:00 +01:00
parent c40949f38d
commit 7e28865a73
3 changed files with 16 additions and 6 deletions

View File

@@ -4,8 +4,7 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "webpack --mode production", "build": "webpack --mode production"
"postinstall": "npm run build"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@@ -31,9 +31,19 @@ const mac: builder.CliOptions = {
} }
async function buildAll() { async function buildAll() {
// await builder.build(linux) switch (process.argv[2]) {
// await builder.build(win) case 'win':
await builder.build(mac) 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() buildAll()

View File

@@ -5,6 +5,7 @@
"main": "electron.js", "main": "electron.js",
"scripts": { "scripts": {
"start": "electron .", "start": "electron .",
"install": "cd app; npm install; cd ..",
"test": "npm run test-backend", "test": "npm run test-backend",
"build": "cd app; npm run build; cd ..; cd backend; npm run build; cd ..", "build": "cd app; npm run build; cd ..; cd backend; npm run build; cd ..",
"test-backend": "cd backend && npm run test && cd ..", "test-backend": "cd backend && npm run test && cd ..",
@@ -16,7 +17,7 @@
}, },
"build": { "build": {
"appId": "mqtt-explorer", "appId": "mqtt-explorer",
"nodeGypRebuild": true, "nodeGypRebuild": false,
"mac": { "mac": {
"category": "de.t7n.apps.mq-explorer", "category": "de.t7n.apps.mq-explorer",
"publish": [ "publish": [