Skip to content

Commit 2f15784

Browse files
devversionjosephperrott
authored andcommitted
refactor(schematics): better ng-update success message (#13687)
1 parent 992bcfb commit 2f15784

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

src/cdk/schematics/ng-update/index.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import {Rule} from '@angular-devkit/schematics';
10+
import {green, yellow} from 'chalk';
1011
import {TargetVersion} from './target-version';
1112
import {cdkUpgradeData} from './upgrade-data';
1213
import {createUpgradeRule} from './upgrade-rules';
@@ -36,7 +37,11 @@ export function updateToV7(): Rule {
3637

3738
/** Post-update schematic to be called when update is finished. */
3839
export function postUpdate(): Rule {
39-
return () => console.log(
40-
'\nComplete! Please check the output above for any issues that were detected but could not' +
41-
' be automatically fixed.');
40+
return () => {
41+
console.log();
42+
console.log(green(' ✓ Angular CDK update complete'));
43+
console.log();
44+
console.log(yellow(' ⚠ Please check the output above for any issues that were detected ' +
45+
'but could not be automatically fixed.'));
46+
};
4247
}

src/lib/schematics/ng-update/index.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import {Rule} from '@angular-devkit/schematics';
1010
import {TargetVersion, createUpgradeRule, UpgradeTSLintConfig} from '@angular/cdk/schematics';
11+
import {green, yellow} from 'chalk';
1112
import {sync as globSync} from 'glob';
1213
import {materialUpgradeData} from './upgrade-data';
1314

@@ -47,7 +48,11 @@ export function updateToV7(): Rule {
4748

4849
/** Post-update schematic to be called when update is finished. */
4950
export function postUpdate(): Rule {
50-
return () => console.log(
51-
'\nComplete! Please check the output above for any issues that were detected but could not' +
52-
' be automatically fixed.');
51+
return () => {
52+
console.log();
53+
console.log(green(' ✓ Angular Material update complete'));
54+
console.log();
55+
console.log(yellow(' ⚠ Please check the output above for any issues that were detected ' +
56+
'but could not be automatically fixed.'));
57+
};
5358
}

0 commit comments

Comments
 (0)