babel-plugin-transform-dev
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -12,2 +12,9 @@ # Changelog | ||
## 2.0.0 (December 3, 2015) | ||
- **Breaking Change** | ||
- Replace `__ENV__` with the result of evaluating `"production" !== process.env.NODE_ENV` | ||
- **Internal** | ||
- Don't run tests twice in before release hook | ||
## 1.1.1 (December 2, 2015) | ||
@@ -14,0 +21,0 @@ |
@@ -18,3 +18,3 @@ 'use strict'; | ||
if (t.isIdentifier(path.node, { name: '__DEV__' })) { | ||
path.replaceWith(this.opts.evaluate ? bool : expr); | ||
path.replaceWith(this.opts.evaluate !== false ? bool : expr); | ||
} | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "babel-plugin-transform-dev", | ||
"version": "1.1.1", | ||
"description": "A plugin for Babel v6 which replaces `__DEV__` with `'production' !== process.env.NODE_ENV`.", | ||
"version": "2.0.0", | ||
"description": "A plugin for Babel v6 which replaces `__DEV__` with the result of evaluating `'production' !== process.env.NODE_ENV`.", | ||
"main": "lib/index.js", | ||
@@ -33,5 +33,5 @@ "keywords": [ | ||
"postversion": "git push --tags origin HEAD:master", | ||
"release:breaking": "npm test && npm version major -m 'Release v%s' && npm publish", | ||
"release:feature": "npm test && npm version minor -m 'Release v%s' && npm publish", | ||
"release:fix": "npm test && npm version patch -m 'Release v%s' && npm publish" | ||
"release:breaking": "npm version major -m 'Release v%s' && npm publish", | ||
"release:feature": "npm version minor -m 'Release v%s' && npm publish", | ||
"release:fix": "npm version patch -m 'Release v%s' && npm publish" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
@@ -6,9 +6,7 @@ # babel-plugin-transform-dev | ||
Replaces all occurrences of `__DEV__` in your JavaScript code with `"production" !== process.env.NODE_ENV`. | ||
Replaces all occurrences of `__DEV__` in your JavaScript code with the result of evaluating `"production" !== process.env.NODE_ENV`. | ||
Make sure to put this plugin before other plugins that might transform `process.env`. | ||
In order to replace `__ENV__` with just `"production" !== process.env.NODE_ENV`, set the plugin's `evaluate` option to `false`. | ||
You can also set the plugin's `evaluate` option to `true` in order to replace `__ENV__` with the result of evaluating `"production" !== process.env.NODE_ENV` at build time. | ||
## Installation | ||
@@ -15,0 +13,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5450
61