diff --git a/packages/angular-cli/blueprints/ng2/index.js b/packages/angular-cli/blueprints/ng2/index.js index 97eb59b378d3..6e5467990eb1 100644 --- a/packages/angular-cli/blueprints/ng2/index.js +++ b/packages/angular-cli/blueprints/ng2/index.js @@ -16,6 +16,12 @@ module.exports = { { name: 'inline-template', type: Boolean, default: false, aliases: ['it'] } ], + beforeInstall: function(options) { + if (options.ignoredUpdateFiles && options.ignoredUpdateFiles.length > 0) { + return Blueprint.ignoredUpdateFiles = Blueprint.ignoredUpdateFiles.concat(options.ignoredUpdateFiles); + } + }, + afterInstall: function (options) { if (options.mobile) { return Blueprint.load(path.join(__dirname, '../mobile')).install(options); diff --git a/packages/angular-cli/commands/init.ts b/packages/angular-cli/commands/init.ts index 1b300e43b588..c291bec3493a 100644 --- a/packages/angular-cli/commands/init.ts +++ b/packages/angular-cli/commands/init.ts @@ -105,7 +105,8 @@ const InitCommand: any = Command.extend({ mobile: commandOptions.mobile, routing: commandOptions.routing, inlineStyle: commandOptions.inlineStyle, - inlineTemplate: commandOptions.inlineTemplate + inlineTemplate: commandOptions.inlineTemplate, + ignoredUpdateFiles: ['favicon.ico'] }; if (!validProjectName(packageName)) { diff --git a/tests/acceptance/init.spec.js b/tests/acceptance/init.spec.js index 6be6287337c2..8005867726b7 100644 --- a/tests/acceptance/init.spec.js +++ b/tests/acceptance/init.spec.js @@ -148,11 +148,6 @@ describe('Acceptance: ng init', function () { it('init an already init\'d folder', function () { return ng(['init', '--skip-npm', '--skip-bower']) - .then(function () { - // ignore the favicon file for the the unit test since it breaks at ember-cli level - // when trying to re-init - Blueprint.ignoredFiles.push('favicon.ico'); - }) .then(function () { return ng(['init', '--skip-npm', '--skip-bower']); })