ember-cli-babel
Advanced tools
Comparing version 4.2.0 to 4.3.0
13
index.js
@@ -11,4 +11,3 @@ var checker = require('ember-cli-version-checker'); | ||
setupPreprocessorRegistry: function(type, registry) { | ||
var options = getOptions(this.parent && this.parent.options && this.parent.options['babel']); | ||
var addon = this; | ||
var plugin = { | ||
@@ -18,3 +17,3 @@ name: 'ember-cli-babel', | ||
toTree: function(tree) { | ||
return require('broccoli-babel-transpiler')(tree, options); | ||
return require('broccoli-babel-transpiler')(tree, getOptions(addon)); | ||
} | ||
@@ -28,3 +27,3 @@ }; | ||
this._super.included.apply(this, arguments); | ||
this.app = app; | ||
if (this.shouldSetupRegistryInIncluded()) { | ||
@@ -36,5 +35,5 @@ this.setupPreprocessorRegistry('parent', app.registry); | ||
function getOptions(options) { | ||
options = options || {}; | ||
function getOptions(addonContext) { | ||
var baseOptions = (addonContext.parent && addonContext.parent.options) || (addonContext.app && addonContext.app.options), | ||
options = baseOptions && baseOptions['babel'] || {}; | ||
// Ensure modules aren't compiled unless explicitly set to compile | ||
@@ -41,0 +40,0 @@ options.blacklist = options.blacklist || ['es6.modules']; |
{ | ||
"name": "ember-cli-babel", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
12859
199