babel-plugin-dev

Babel plugin that replaces the "__DEV__" keyword with "process.env.NODE_ENV !== 'production'" for dev- and debug-specific code.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-dev
301.0.07 years ago7 years agoMinified + gzip package size for babel-plugin-dev in KB

Readme

babel-plugin-dev
Replaces __DEV__ with process.env.NODE_ENV !== 'production'.

Installation

$ npm install babel-plugin-dev

Usage

Via .babelrc (Recommended)

.babelrc
{
  "plugins": ["dev"]
}

Via CLI

$ babel --plugins dev script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["dev"]
});

Running the tests

$ git clone https://github.com/Zenwolf/babel-plugin-dev.git
$ cd babel-plugin-dev
$ npm install
$ npm test