Skip to content

Instantly share code, notes, and snippets.

@benjaminadk
Created October 6, 2018 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjaminadk/f2cd19b34122075417148849aec7e64b to your computer and use it in GitHub Desktop.
Save benjaminadk/f2cd19b34122075417148849aec7e64b to your computer and use it in GitHub Desktop.
A simple Electron build field configuration for Windows
// build field from package.json
// productName - Output executable will be based on this, the official name of the app
// win - means we are targeting Windows
// icon - the icon for the executable file, taskbar, shortcuts, etc
// publish - automatically pushes the executable to a distribution platform
// provider - i am using github releases - people can go there and download my app
// owner - my github name
// target - type of build, there are more options for Windows - appx, squirrel as well as MacOS and Linux options
// directories - by default input dir is dist, here output is assigned to release - all built files will end up there
"build": {
"appId": "com.electron.hslpicker",
"productName": "Color Tool",
"win": {
"icon": "static/picker-icon-1.ico",
"publish": {
"provider": "github",
"owner": "benjaminadk"
},
"target": [
"nsis"
]
},
"directories": {
"output": "release"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment