O'Reilly logo
  • Valerio Viscardi thinks this is interesting:

Listing 2.2. The main.js file for the Electron app


I think the condition app.on('window-all-closed' should be modified as:

       if (process.platform === 'darwin') app.quit();

Leaving it as is, would immediately close the app on, say, Linux. While on Mac OS X closing all the windows would NOT close the app.