babel-preset-es2015-node
Advanced tools
Comparing version 6.0.1 to 6.1.0
24
index.js
@@ -0,5 +1,23 @@ | ||
var semver = require("semver"); | ||
var pluginsList = [ | ||
require("babel-plugin-transform-es2015-modules-commonjs") | ||
]; | ||
if (semver.lt(process.version, '6.0.0')) { | ||
pluginsList.push( | ||
require("babel-plugin-transform-es2015-destructuring"), | ||
require("babel-plugin-transform-es2015-function-name"), | ||
require("babel-plugin-transform-es2015-parameters"), | ||
require("babel-plugin-transform-es2015-shorthand-properties"), | ||
require("babel-plugin-transform-es2015-sticky-regex"), | ||
require("babel-plugin-transform-es2015-unicode-regex")); | ||
} | ||
if (semver.lt(process.version, '5.0.0')) { | ||
pluginsList.push(require("babel-plugin-transform-es2015-spread")); | ||
} | ||
module.exports = { | ||
plugins: [ | ||
require("babel-plugin-transform-es2015-modules-commonjs"), | ||
] | ||
plugins: pluginsList | ||
}; |
{ | ||
"name": "babel-preset-es2015-node", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "Babel preset for all es2015 plugins needed with latest stable node.", | ||
@@ -11,7 +11,15 @@ "author": "Ryan Tsao <ryan.j.tsao@gmail.com>", | ||
"engines": { | ||
"node": ">= 6.0.0" | ||
"node": ">= 4.0.0" | ||
}, | ||
"dependencies": { | ||
"babel-plugin-transform-es2015-modules-commonjs": "6.x" | ||
"babel-plugin-transform-es2015-destructuring": "6.x", | ||
"babel-plugin-transform-es2015-function-name": "6.x", | ||
"babel-plugin-transform-es2015-modules-commonjs": "6.x", | ||
"babel-plugin-transform-es2015-parameters": "6.x", | ||
"babel-plugin-transform-es2015-shorthand-properties": "6.x", | ||
"babel-plugin-transform-es2015-spread": "6.x", | ||
"babel-plugin-transform-es2015-sticky-regex": "6.x", | ||
"babel-plugin-transform-es2015-unicode-regex": "6.x", | ||
"semver": "5.1.0" | ||
} | ||
} |
@@ -5,16 +5,10 @@ # babel-preset-es2015-node | ||
This preset determines which node version you are using via `process.version` and accordingly sets the necessary ES2015 Babel plugins. | ||
All versions of node >=4 are supported. | ||
## Install | ||
#### Node 6 | ||
```sh | ||
$ npm install --save-dev babel-preset-es2015-node@6 | ||
$ npm install --save-dev babel-preset-es2015-node | ||
``` | ||
#### Node 5 | ||
```sh | ||
$ npm install --save-dev babel-preset-es2015-node@5 | ||
``` | ||
#### Node 4 | ||
```sh | ||
$ npm install --save-dev babel-preset-es2015-node@4 | ||
``` | ||
@@ -21,0 +15,0 @@ ## Usage |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3322
19
0
9
39
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.x
+ Addedsemver@5.1.0
+ Addedbabel-helper-call-delegate@6.24.1(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-hoist-variables@6.24.1(transitive)
+ Addedbabel-helper-regex@6.26.0(transitive)
+ Addedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
+ Addedjsesc@0.5.0(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregexpu-core@2.0.0(transitive)
+ Addedregjsgen@0.2.0(transitive)
+ Addedregjsparser@0.1.5(transitive)
+ Addedsemver@5.1.0(transitive)