babel-plugin-transform-inline-environment-variables
Advanced tools
Comparing version 0.4.0-alpha.6546ad11 to 0.4.0-alpha.f95869d4
@@ -5,3 +5,2 @@ "use strict"; | ||
var t = _ref.types; | ||
return { | ||
@@ -12,3 +11,3 @@ name: "transform-inline-environment-variables", | ||
var _ref2$opts = _ref2.opts; | ||
_ref2$opts = _ref2$opts === undefined ? {} : _ref2$opts; | ||
_ref2$opts = _ref2$opts === void 0 ? {} : _ref2$opts; | ||
var include = _ref2$opts.include, | ||
@@ -19,2 +18,3 @@ exclude = _ref2$opts.exclude; | ||
var key = path.toComputedKey(); | ||
if (t.isStringLiteral(key) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) { | ||
@@ -25,4 +25,5 @@ path.replaceWith(t.valueToNode(process.env[key.value])); | ||
} | ||
} | ||
}; | ||
}; |
{ | ||
"name": "babel-plugin-transform-inline-environment-variables", | ||
"version": "0.4.0-alpha.6546ad11", | ||
"version": "0.4.0-alpha.f95869d4", | ||
"description": "Inline environment variables.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -59,3 +59,3 @@ # babel-plugin-transform-inline-environment-variables | ||
```javascript | ||
require("babel-core").transform("code", { | ||
require("@babel/core").transform("code", { | ||
plugins: ["transform-inline-environment-variables"] | ||
@@ -62,0 +62,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
2196