Electron packaging
Two method, electron-builder or electron-packager
install
npm isntall -g electron-packager
and npm isntall -g electron-builder
Use electron packager:
electron-packager <sourcedir> <appname> <platform> <architecture> <electron version> <optional options>
e.g:
electron-packager . ApplicationName --win --out ./out --arch=x64 --overwrite --ignore=node_module
Use electron builder
add this script into your package.json
"build": { "appId": "com.xxx.app", "mac": { "target": ["dmg","zip"] }, "win": { "target": ["nsis","zip"] }
Then, use electron-builder
. You can also add args like electron-builder --win --x64