broccoli-babel-transpiler
Advanced tools
Comparing version 5.4.0 to 5.4.1
@@ -40,10 +40,8 @@ 'use strict'; | ||
this.exportModuleMetadata = this.options.exportModuleMetadata; | ||
// Note, Babel does not support this option so we must save it then | ||
// delete it from the options hash | ||
delete this.options.exportModuleMetadata; | ||
} | ||
// Note, Babel does not support this option so we must save it then | ||
// delete it from the options hash | ||
delete this.options.exportModuleMetadata; | ||
if (this.options.browserPolyfill) { | ||
delete this.options.browserPolyfill; | ||
var babelCorePath = require.resolve('babel-core'); | ||
@@ -57,2 +55,3 @@ babelCorePath = babelCorePath.replace(/\/babel-core\/.*$/, '/babel-core'); | ||
} | ||
delete this.options.browserPolyfill; | ||
} | ||
@@ -59,0 +58,0 @@ |
{ | ||
"name": "broccoli-babel-transpiler", | ||
"version": "5.4.0", | ||
"version": "5.4.1", | ||
"description": "A Broccoli plugin which transpile ES6 to readable ES5 by using babel.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
26
test.js
@@ -89,3 +89,3 @@ 'use strict'; | ||
it('does not propogate validExtensions', function () { | ||
it('does not propagate validExtensions', function () { | ||
var transpilerOptions; | ||
@@ -369,1 +369,25 @@ | ||
}); | ||
describe('consume broccoli-babel-transpiler options', function() { | ||
it('enabled', function() { | ||
var options = { | ||
exportModuleMetadata: true, | ||
browserPolyfill: true | ||
}; | ||
babel = new Babel('foo', options); | ||
var code = babel.processString('path', 'relativePath'); | ||
expect(code).to.be.ok; | ||
}); | ||
it('explicitly disabled', function() { | ||
var options = { | ||
exportModuleMetadata: false, | ||
browserPolyfill: false | ||
}; | ||
babel = new Babel('foo', options); | ||
var code = babel.processString('path', 'relativePath'); | ||
expect(code).to.be.ok; | ||
}); | ||
}); |
21893
533