From 7901cae6ed99c4c2474426d026127b0726ae0195 Mon Sep 17 00:00:00 2001 From: Stanley Stuart Date: Tue, 12 Jan 2016 12:01:30 -0600 Subject: [PATCH] [BUGFIX release] don't load "app" code when loading globals files The code that gets compiled for the globals build is in a closure with its own instance of `loader.js`, so the entries for ember-data don't end up in ember-cli's instance of `loader.js`. The ember-data code does include shims that end up in the app's instance of loader.js, so we exclude the app code from running in this case. --- bower.json | 6 +++--- index.js | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 4ed1c4b9ee6..e236b24bda7 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "ember-data", "dependencies": { - "ember": "components/ember#release", + "ember": "components/ember#beta", "ember-cli-shims": "ember-cli/ember-cli-shims#0.1.0", "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5", @@ -13,6 +13,6 @@ "qunit": "~1.18.0" }, "resolutions": { - "ember": "release" + "ember": "beta" } -} +} \ No newline at end of file diff --git a/index.js b/index.js index cc1c7022ff0..ce7c24a49cc 100644 --- a/index.js +++ b/index.js @@ -64,6 +64,17 @@ module.exports = { return path.join(__dirname, 'blueprints'); }, + treeForApp: function(dir) { + if (this._forceBowerUsage) { + // Fake an empty broccoli tree + return { inputTree: dir, rebuild: function() { return []; } }; + } + + // this._super.treeForApp is undefined in ember-cli (1.13) for some reason. + // TODO: investigate why treeForApp isn't on _super + return dir; + }, + treeForAddon: function(dir) { if (this._forceBowerUsage) { // Fakes an empty broccoli tree