Skip to content

Commit

Permalink
fix(@angular/cli): don't load old ember config
Browse files Browse the repository at this point in the history
Close #4057
  • Loading branch information
celliott181 authored and filipesilva committed Feb 14, 2017
1 parent fce9f18 commit 98a3430
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions packages/@angular/cli/ember-cli/lib/models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,6 @@ Project.prototype.isEmberCLIAddon = function() {
return !!this.pkg.keywords && this.pkg.keywords.indexOf('ember-addon') > -1;
};

/**
Returns the path to the configuration.
@private
@method configPath
@return {String} Configuration path
*/
Project.prototype.configPath = function() {
var configPath = 'config';

if (this.pkg['ember-addon'] && this.pkg['ember-addon']['configPath']) {
configPath = this.pkg['ember-addon']['configPath'];
}

return path.join(configPath, 'environment');
};

/**
Loads the configuration for this project and its addons.
Expand All @@ -155,31 +138,9 @@ Project.prototype.configPath = function() {
@return {Object} Merged confiration object
*/
Project.prototype.config = function(env) {
var configPath = this.configPath();

if (existsSync(path.join(this.root, configPath + '.js'))) {
var appConfig = this.require('./' + configPath)(env);
var addonsConfig = this.getAddonsConfig(env, appConfig);

return merge(addonsConfig, appConfig);
} else {
return this.getAddonsConfig(env, {});
}
};

/**
Returns the addons configuration.
@private
@method getAddonsConfig
@param {String} env Environment name
@param {Object} appConfig Application configuration
@return {Object} Merged configuration of all addons
*/
Project.prototype.getAddonsConfig = function(env, appConfig) {
this.initializeAddons();

var initialConfig = merge({}, appConfig);
var initialConfig = {};

return this.addons.reduce(function(config, addon) {
if (addon.config) {
Expand Down

0 comments on commit 98a3430

Please sign in to comment.