1.2.0 • Published 5 years ago

@liangchengj/electron-is-dev v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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

import * as isDev from '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