Skip to content

Instantly share code, notes, and snippets.

@rootVIII
Last active May 30, 2022 16:10
Show Gist options
  • Save rootVIII/7d5b1ebd17ec7c5c37c52491f8c49064 to your computer and use it in GitHub Desktop.
Save rootVIII/7d5b1ebd17ec7c5c37c52491f8c49064 to your computer and use it in GitHub Desktop.
Javascript Electron builder
// package.json must have similar to below
// in the "scripts" section:
// "scripts": {
// "start": "electron .",
// "pack": "electron-builder -m",
// "test": "echo \"Error: no test specified\" && exit 1"
// }
//
//
// Disable code signing:
// export CSC_IDENTITY_AUTO_DISCOVERY=false
//
// Install electron-builder requirement:
// npm install electron-builder --save-dev
//
// navigate to project root and run:
// npm run pack
{
"appId": "com.solsticenet.cidr_calc",
"productName": "CIDR Calculator",
"copyright": "rootVIII",
"files": [
"package.json",
"src/*",
"static/*",
"templates/*",
"node_modules/**/*",
"cidr_calculator.js",
"main.js"
],
"dmg": {
"background": null,
"backgroundColor": "#FEFEFE",
"window": {
"width": "800",
"height": "330"
},
"contents": [
{
"x": 100,
"y": 100
},
{
"x": 300,
"y": 100,
"type": "link",
"path": "/Applications"
}
]
},
"mac": {
"target": "dmg",
"icon": "icon.png", // stored in build/
"category": "public.app-category.utilities"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment