Browse Source

Fix packaged functionality

Improve dependency management for Electron main process deps

Dependencies in /electron/package.json will be installed through a script in /package.json and will be bundled via electron-builder

Does not affect standard webapp whatsoever

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/3622/head
Michael Telatynski 5 years ago
parent
commit
3fb54029d7
  1. 1
      .gitignore
  2. 6
      electron/package.json
  3. 11
      package.json

1
.gitignore vendored

@ -5,6 +5,7 @@
/key.pem
/lib
/node_modules
/electron/node_modules
/packages/
/webapp
/.npmrc

6
electron/package.json

@ -0,0 +1,6 @@
{
"description": "Electron main process dependencies",
"dependencies": {
"electron-window-state": "^4.1.0"
}
}

11
package.json

@ -36,6 +36,7 @@
"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",
"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",
@ -96,7 +97,6 @@
"css-raw-loader": "^0.1.1",
"electron-builder": "^11.2.4",
"electron-builder-squirrel-windows": "^11.2.1",
"electron-window-state": "^4.1.0",
"emojione": "^2.2.7",
"eslint": "^3.14.0",
"eslint-config-google": "^0.7.1",
@ -145,6 +145,7 @@
"dereference": true,
"//files": "We bundle everything, so we only need to include webapp/",
"files": [
"electron/node_modules/**",
"electron/src/**",
"electron/img/**",
"webapp/**",
@ -159,10 +160,10 @@
},
"win": {
"target": "squirrel"
},
"directories": {
"buildResources": "electron/build",
"output": "electron/dist"
}
},
"directories": {
"buildResources": "electron/build",
"output": "electron/dist"
}
}

Loading…
Cancel
Save