steal-es6-module-loader
Advanced tools
Comparing version 0.16.3-bitovi.5 to 0.17.0
{ | ||
"name": "steal-es6-module-loader", | ||
"description": "An ES6 Module Loader shim", | ||
"version": "0.16.3-bitovi.5", | ||
"version": "0.17.0", | ||
"homepage": "https://github.com/ModuleLoader/es6-module-loader", | ||
@@ -64,8 +64,3 @@ "author": { | ||
"test:browser-babel": "karma start --single-run --babel", | ||
"test:browser:perf": "karma start karma-benchmark.conf.js --single-run", | ||
"publish": "git push origin && git push origin --tags", | ||
"release:prerelease": "npm version prerelease && npm publish", | ||
"release:patch": "npm version patch && npm publish", | ||
"release:minor": "npm version minor && npm publish", | ||
"release:major": "npm version major && npm publish" | ||
"test:browser:perf": "karma start karma-benchmark.conf.js --single-run" | ||
}, | ||
@@ -72,0 +67,0 @@ "dependencies": { |
@@ -12,3 +12,3 @@ /* | ||
// use Traceur by default | ||
Loader.prototype.transpiler = 'traceur'; | ||
Loader.prototype.transpiler = 'babel'; | ||
@@ -26,3 +26,3 @@ Loader.prototype.transpile = function(load) { | ||
} | ||
return self['import'](self.transpiler).then(function(transpiler) { | ||
@@ -87,3 +87,2 @@ if (transpiler.__useDefault) | ||
var options = this.babelOptions || {}; | ||
options.modules = 'system'; | ||
options.sourceMap = 'inline'; | ||
@@ -93,6 +92,22 @@ options.filename = load.address; | ||
options.ast = false; | ||
if (!options.blacklist) | ||
options.blacklist = ['react']; | ||
var babelVersion = babel.version ? +babel.version.split(".")[0] : 6; | ||
if(!babelVersion) babelVersion = 6; | ||
if(babelVersion >= 6) { | ||
// If the user didn't provide presets/plugins, use the defaults | ||
if(!options.presets && !options.plugins) { | ||
options.presets = [ | ||
"es2015-no-commonjs", "react", "stage-0" | ||
]; | ||
options.plugins = [ | ||
"transform-es2015-modules-systemjs" | ||
]; | ||
} | ||
} else { | ||
options.modules = 'system'; | ||
if (!options.blacklist) | ||
options.blacklist = ['react']; | ||
} | ||
var source = babel.transform(load.source, options).code; | ||
@@ -99,0 +114,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
373714
7115
7