I will use the example from my tutorial. Install electron-packager:
\nodejs\electronapp>npm install electron-packager --save-dev
You need to add and modify the scripts below into your package.json:
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/
icon.icns --prune=true --out=release-builds",
"package-win": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=win32
--arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds
"package-linux": "electron-packager . electron-tutorial-app --overwrite --asar=true
--platform=linux --arch=x64 --icon=assets/icons/png/1024x1024.png --prune=true --out=release-builds"
You can create these folders: assets, icons, win, mac and png, see:
You need one icon file with this extension .png, .ico and .icns for… Continue Reading Create MacOS, Windows and Linux cross-platform applications with Electron packager.