electron build windows code example
Example 1: electron build windows exe
# for use in npm scripts
npm install electron-packager --save-dev
# for use from cli
npm install electron-packager -g
electron-packager <sourcedir> <appname> --platform=win32 --arch=x64
Example 2: electron setup cmd
1) Make sure node.js is installed on your machine
2) CD into your directory
3) Crete a json package using the following command:
npm init
4) Install the electron module using the following command:
npm install --save-dev electron