systemjs-plugin-babel
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "systemjs-plugin-babel", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"registry": "npm", | ||
@@ -5,0 +5,0 @@ "jspmPackage": true, |
@@ -13,3 +13,3 @@ var babel = require('systemjs-babel-build').babel; | ||
var babelRuntimePath = System.decanonicalize('babel-runtime/', module.id); | ||
var babelRuntimePath; | ||
var modularHelpersPath = System.decanonicalize('./babel-helpers/', module.id); | ||
@@ -19,4 +19,2 @@ var externalHelpersPath = System.decanonicalize('./babel-helpers.js', module.id); | ||
if (babelRuntimePath.substr(babelRuntimePath.length - 3, 3) == '.js') | ||
babelRuntimePath = babelRuntimePath.substr(0, babelRuntimePath.length - 3); | ||
if (modularHelpersPath.substr(modularHelpersPath.length - 3, 3) == '.js') | ||
@@ -27,3 +25,2 @@ modularHelpersPath = modularHelpersPath.substr(0, modularHelpersPath.length - 3); | ||
if (System.getCanonicalName) { | ||
babelRuntimePath = System.getCanonicalName(babelRuntimePath); | ||
modularHelpersPath = System.getCanonicalName(modularHelpersPath); | ||
@@ -165,4 +162,11 @@ externalHelpersPath = System.getCanonicalName(externalHelpersPath); | ||
else if (m.substr(0, 14) == 'babel-runtime/') { | ||
if (babelRuntimePath == 'babel-runtime/') | ||
throw new Error('The babel-runtime module must be mapped to support modular helpers and builtins. If using jspm run jspm install npm:babel-runtime.'); | ||
if (!babelRuntimePath) { | ||
babelRuntimePath = System.decanonicalize('babel-runtime/', module.id); | ||
if (babelRuntimePath.substr(babelRuntimePath.length - 3, 3) == '.js') | ||
babelRuntimePath = babelRuntimePath.substr(0, babelRuntimePath.length - 3); | ||
if (loader.getCanonicalName) | ||
babelRuntimePath = loader.getCanonicalName(babelRuntimePath); | ||
if (babelRuntimePath == 'babel-runtime/') | ||
throw new Error('The babel-runtime module must be mapped to support modular helpers and builtins. If using jspm run jspm install npm:babel-runtime.'); | ||
} | ||
m = babelRuntimePath + m.substr(14) + '.js'; | ||
@@ -169,0 +173,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
2207232
44048