Check if Electron is running in development
JavaScript
Latest commit 7922aae Aug 17, 2016 @sindresorhus 0.1.2
Permalink
Failed to load latest commit information.
.editorconfig init Apr 8, 2016
.gitattributes init Apr 8, 2016
.gitignore init Apr 8, 2016
.travis.yml init Apr 8, 2016
index.js test for /electron/ in the path (#3) Aug 17, 2016
license init Apr 8, 2016
package.json 0.1.2 Aug 17, 2016
readme.md init Apr 8, 2016

readme.md

electron-is-dev

Check if Electron is running in development

Useful for enabling debug features only during development.

Install

$ npm install --save electron-is-dev

Usage

const isDev = require('electron-is-dev');

if (isDev) {
    console.log('Running in development');
} else {
    console.log('Running in production');
}

Related

License

MIT © Sindre Sorhus