Skip to content

Develop & Distribute

ia edited this page Jun 26, 2017 · 1 revision

Develop

On master branch you'll find in ./package.json:

...
"main": "./electron/webpack-main.js",
...

This setting works for building distributions, but it doesn't work for development (at least for me (@whilei)) as-is. In order to develop, you'll need to change this value to "main": "./electron/main.js" to use the un-compiled electron entry for Electron.


Then, to build (watch-fully) and run Electron you can use:

# Terminal 1
npm run build:all
# Terminal 2
npm run start:electron

Note that you'll have to refresh Electron (CMD-R) to view new changes.

Also, the webpack-dev-server functionality is broken, so yea, you've got to develop inside of Electron at this point.

I'm pretty sure these issues, eg

  • main.js vs. webpack-main.js
  • webpack-dev-server broken

all relate to webpacking/compiling/babel-izing somehow... if you can fix this I will buy you a beer next time you're in St. Louis.


Distribution:

  1. Change the "main" field in package.json to be webpack-main.js.
  2. Commit and push.
  3. Release builds will be made on onTagOrDraft, and (currently) automatically release to Github, with Bintray in the works.
Clone this wiki locally