Skip to content

Commit a935ed5

Browse files
Charles LydingBrocco
Charles Lyding
authored andcommitted
refactor(@angular/cli): use UI method to show component generation warning
1 parent c8d2723 commit a935ed5

File tree

1 file changed

+5
-2
lines changed
  • packages/@angular/cli/blueprints/component

1 file changed

+5
-2
lines changed

packages/@angular/cli/blueprints/component/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ export default Blueprint.extend({
228228
afterInstall: function (options: any) {
229229
const appConfig = getAppFromConfig(this.options.app);
230230
if (options.prefix && appConfig.prefix && appConfig.prefix !== options.prefix) {
231-
console.log(chalk.yellow(oneLine`You are using different prefix from app,
232-
you might get lint errors. Please update "tslint.json" accordingly.`));
231+
this._writeStatusToUI(chalk.yellow, 'WARNING', oneLine`
232+
You are using a different prefix than the app ['${appConfig.prefix}']
233+
and may receive lint failures.
234+
Please verify/update 'tslint.json' accordingly.
235+
`);
233236
}
234237

235238
const returns: Array<any> = [];

0 commit comments

Comments
 (0)