From 586ef1fc0a13d75d8e58ceeb52355c2a35816aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20H=C3=A1m?= Date: Sun, 1 Jan 2017 14:47:52 +0100 Subject: [PATCH 1/3] feat(new): show name of created project in output Fixes #3685 --- packages/angular-cli/commands/init.run.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular-cli/commands/init.run.ts b/packages/angular-cli/commands/init.run.ts index 13fbdfc45c29..7482b8010a92 100644 --- a/packages/angular-cli/commands/init.run.ts +++ b/packages/angular-cli/commands/init.run.ts @@ -1,3 +1,4 @@ +import * as chalk from 'chalk'; import LinkCli from '../tasks/link-cli'; import NpmInstall from '../tasks/npm-install'; @@ -101,5 +102,8 @@ export default function initRun(commandOptions: any, rawArgs: string[]) { if (commandOptions.linkCli) { return linkCli.run(); } - }); + }) + .then(function () { + this.ui.writeLine(chalk.green('Project `' + packageName + '` successfully created.')); + }.bind(this)); } From b2b1beedaad865de27c9e94ddf056695a4df20c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20H=C3=A1m?= Date: Tue, 10 Jan 2017 20:50:42 +0100 Subject: [PATCH 2/3] arrow function and template literals --- packages/angular-cli/commands/init.run.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular-cli/commands/init.run.ts b/packages/angular-cli/commands/init.run.ts index 7482b8010a92..6aefb1411c5f 100644 --- a/packages/angular-cli/commands/init.run.ts +++ b/packages/angular-cli/commands/init.run.ts @@ -103,7 +103,7 @@ export default function initRun(commandOptions: any, rawArgs: string[]) { return linkCli.run(); } }) - .then(function () { - this.ui.writeLine(chalk.green('Project `' + packageName + '` successfully created.')); - }.bind(this)); + .then(() => { + this.ui.writeLine(chalk.green(`Project '${packageName}' successfully created.`)); + }); } From 12f151582c4440f783f000d7fd4d3491c713c865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20H=C3=A1m?= Date: Tue, 10 Jan 2017 20:54:14 +0100 Subject: [PATCH 3/3] remove unnecessary bind --- packages/angular-cli/commands/init.run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular-cli/commands/init.run.ts b/packages/angular-cli/commands/init.run.ts index 6aefb1411c5f..0707ccb4135c 100644 --- a/packages/angular-cli/commands/init.run.ts +++ b/packages/angular-cli/commands/init.run.ts @@ -92,7 +92,7 @@ export default function initRun(commandOptions: any, rawArgs: string[]) { if (commandOptions.skipGit === false) { return gitInit.run(commandOptions, rawArgs); } - }.bind(this)) + }) .then(function () { if (!commandOptions.skipNpm) { return npmInstall.run();