build electron app 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
$ npm i -D electron@latest
# Electron 11.0.1
# Node 12.18.3
# Chromium 87.0.4280.60
Example 3: js electron setup
npm install electron --save-devCopy