2.0.1 • Published 8 years ago
babel-plugin-transform-dev v2.0.1
babel-plugin-transform-dev
Replaces all occurrences of __DEV__ in your JavaScript code with the result of evaluating "production" !== process.env.NODE_ENV.
In order to replace __ENV__ with just "production" !== process.env.NODE_ENV, set the plugin's evaluate option to false.
Installation
$ npm install babel-plugin-transform-devUsage
Via .babelrc (Recommended)
.babelrc
{
  "plugins": ["transform-dev"]
}Via CLI
$ babel --plugins transform-dev script.jsVia Node API
require("babel-core").transform("code", {
  plugins: ["transform-dev"]
});Contributing
- Fork it ( https://github.com/martinandert/babel-plugin-transform-dev )
 - Run 
npm installto install dependencies. - Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: 
npm test. - Create your feature branch (
git checkout -b my-new-feature) - Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or are fixing a bug, we need a test!
 - Make the test pass.
 - Commit your changes (
git commit -am 'add some feature') - Push to your fork (
git push origin my-new-feature) - Create a new Pull Request
 
License
Released under The MIT License.