I just got PiratePig (but you could use any sample) working with Electron doing the following steps:
1.) Enter the project directory and run npm install
if you have not already
2.) Install Electron:
npm install electron --save-dev --save-exact
3.) Edit “package.json” and add a new script
"start:electron": "npm run build:dev && cd dist && electron main.js",
4.) Download this file and save it in your “dist” directory
5.) Run npm run start:electron
The “main.js” is a Node.js application, which uses Electron to open a new window, and open “index.html”. All the rest is the same as what we do for the normal web build