ember-cli-bundle-loader
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -5,5 +5,3 @@ import Ember from 'ember'; | ||
export function getContainer (context) { | ||
var hasGetOwner = typeof getOwner === "function"; | ||
var container = hasGetOwner ? getOwner(context) : context.container; | ||
return container; | ||
return context.container ? context.container : getOwner(context); | ||
} | ||
@@ -17,9 +15,9 @@ export function getFactory (context, factoryName){ | ||
var container = getContainer(context); | ||
var hasGetOwner = typeof getOwner === "function"; | ||
if (hasGetOwner) { | ||
var registry = container._registry || container.registry; | ||
if (registry) { | ||
// For 1.13 without using getOwner's "FakeContainer" | ||
registry.register(fullName, factory); | ||
} else { | ||
container.base.register(fullName, factory); | ||
return; | ||
} | ||
var registry = container._registry || container.registry; | ||
registry.register(fullName, factory); | ||
} |
14
index.js
/* jshint node: true */ | ||
'use strict'; | ||
var VersionChecker = require('ember-cli-version-checker'); | ||
module.exports = { | ||
name: 'ember-cli-bundle-loader', | ||
// isDevelopingAddon: function () { | ||
// return true; | ||
// } | ||
included: function (app) { | ||
this._super.included(app); | ||
var checker = new VersionChecker(this); | ||
var emberChecker = checker.for('ember', 'bower'); | ||
if (emberChecker.lt('2.3.0')) { | ||
checker.for('ember-getowner-polyfill', 'npm').assertAbove('1.2.1'); | ||
} | ||
} | ||
}; |
{ | ||
"name": "ember-cli-bundle-loader", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"private": false, | ||
@@ -43,5 +43,7 @@ "description": "The default blueprint for ember-cli addons.", | ||
"ember-cli-uglify": "^1.2.0", | ||
"ember-cli-version-checker": "1.2.0", | ||
"ember-disable-prototype-extensions": "^1.1.0", | ||
"ember-disable-proxy-controllers": "^1.0.1", | ||
"ember-export-application-global": "^1.0.4", | ||
"ember-getowner-polyfill": "~1.2.2", | ||
"ember-load-initializers": "^0.5.0", | ||
@@ -48,0 +50,0 @@ "ember-qunit-nice-errors": "1.1.2", |
Sorry, the diff of this file is too big to display
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
4839312
41
863
31