JSPM

@replace5/electron-is-dev

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q15553F
  • License MIT

Check if Electron is running in development

Package Exports

  • @replace5/electron-is-dev
  • @replace5/electron-is-dev/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@replace5/electron-is-dev) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

electron-is-dev

Check if Electron is running in development

Useful for enabling debug features only during development.

This package must be used from the Electron main 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.