Skip to content

stevenroussey-privicy/electron-is-dev

 
 

Repository files navigation

electron-is-dev

Check if Electron is running in development

Useful for enabling debug features only during development.

You can use this module directly in both the main and renderer process.

Install

$ npm install electron-is-dev

Requires Electron 3 or later.

Usage

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

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

You can force development mode by setting the ELECTRON_IS_DEV environment variable to 1.

Related

License

MIT © Sindre Sorhus

About

Check if Electron is running in development

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 75.7%
  • TypeScript 24.3%