Electron 5

How to notarize electron app

Issue #430

Use electron builder

npm install electron-builder@latest --save-dev

package.json

{
  "name": …

How to fix electron issues

Issue #415

Electron require() is not defined

https://stackoverflow.com/questions/44391448/electron-require-is-not-defined

function createWindow () {
  win = new BrowserWindow({
    title: 'MyApp',
    width: 600, 
    height: 500, …

How to use React JSX with Babel in Electron

Issue #352

For a normal electron app created with npm init, we can use all features of ES6, but not the JSX syntax for React. We can use just Babel to transpile JSX, as used in IconGenerator

.babelrc

{
  "plugins": [ …

How to submit electron app to AppStore

Issue #342

Before

Install electron as dev npm install electron --save-dev Update electron-packager npm install electron-packager@latest --save-dev Use no space in app name

Package with electron-packager

Follow …

How to change app icon in electron

Issue #66

Generate icns

  • Generate .iconset
  • Run iconutil -c icns "Icon.iconset". Note that icon names must be first letter lowsercased, and use _ instead of -

icns

Use icns

  • In main.js, specify icon
win = new BrowserWindow({
  width: 800, …