babel-plugin-conditional-compile
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -10,3 +10,4 @@ 'use strict'; | ||
mapKeys = [], | ||
mapFuncs = undefined; | ||
mapFuncs = undefined, | ||
dropDebugger = undefined; | ||
return { | ||
@@ -17,2 +18,3 @@ visitor: { | ||
dropDebugger = !!PluginPass.opts.dropDebugger; | ||
if (define) { | ||
@@ -31,2 +33,7 @@ mapKeys = Object.getOwnPropertyNames(define); | ||
}, | ||
DebuggerStatement: function DebuggerStatement(path){ | ||
if (dropDebugger) { | ||
path.remove(); | ||
} | ||
}, | ||
@@ -33,0 +40,0 @@ Conditional: { |
{ | ||
"name": "babel-plugin-conditional-compile", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "babel plugin for conditional compile", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -59,1 +59,15 @@ #babel-plugin-conditional-compile | ||
``` | ||
## Options | ||
The available options are | ||
``` | ||
{ | ||
define:{ | ||
APP_VERSION:'1.0.0', | ||
IS_DEV:true | ||
}, | ||
dropDebugger:false | ||
} | ||
``` | ||
* any variable same with key name in define object will be replace by its value | ||
* when dropDebugger set true, the `debugger;` statement will be removed |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
124
73
0
5926
5