-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Add electron-builder to your project, insert into package.json inside devDependencies:
"electron-builder": "^19.45.4"
Now run in the console the command to install this new package into your project:
yarn install
Further add the config for building your app - again in package.json, this time in the top of the hierarchy:
"build": {
"appId": "com.marinisthebest.app",
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories": {
"buildResources": "assets"
},
"mac": {
"target": ["dir"]
},
"compression": "store",
"asar": true
}
You can read on all config options here: https://www.electron.build/configuration/configuration
Add two new scripts to "scripts" section:
"preelectron-pack": "yarn build",
"electron-pack": "build --em.main=build/electron.js"
electron-pack is the script which builds your app. Go to the console and run it:
yarn run electron-pack
This will build your app and save it in a sub-folder called dist in your project
Reactions are currently unavailable