retrixe / decaffeinater

Sometimes games give you overdoses. This one will help you set a timer to limit yourself.
Apache License 2.0
1 stars 0 forks source link

productionMode and devtools. #4

Closed retrixe closed 7 years ago

retrixe commented 7 years ago

When leaving electron-devtools-installer on, it will throw errors after production. Using try/except and set a productionMode variable to detect if the application is running in production can automatically start the installer as well as devtools which will ease development :)

retrixe commented 7 years ago

Commit 5e5e999 fixes this.

How?

In src/main.js by trying to import electron-devtools-installer and setting productionMode to false, but if it is unable to import it, it will set productionMode to true. If productionMode is true, the devtools won't start and it won't load the devtool installer, if it's false, then it will load devtools as well as the icons.