electron-is-dev
Check if Electron is running in development
Last updated 8 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install electron-is-dev 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.0                                ...           latest (8 months ago)

9 Versions

  • 1.2.0                                ...           8 months ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 16
This Week 865
This Month 8,257
Last Day 421
Last Week 2,522
Last Month 9,053
Dependencies (0)
None
Dev Dependencies (2)
Dependents (174)

Copyright 2014 - 2016 © taobao.org |