refactor(schematics): better ng-update success message (#13687)

This commit is contained in:
Paul Gschwendtner
2018-10-19 23:38:04 +02:00
committed by Joey Perrott
parent 992bcfb179
commit 2f1578478e
2 changed files with 16 additions and 6 deletions
+8 -3
View File
@@ -7,6 +7,7 @@
*/
import {Rule} from '@angular-devkit/schematics';
import {green, yellow} from 'chalk';
import {TargetVersion} from './target-version';
import {cdkUpgradeData} from './upgrade-data';
import {createUpgradeRule} from './upgrade-rules';
@@ -36,7 +37,11 @@ export function updateToV7(): Rule {
/** Post-update schematic to be called when update is finished. */
export function postUpdate(): Rule {
return () => console.log(
'\nComplete! Please check the output above for any issues that were detected but could not' +
' be automatically fixed.');
return () => {
console.log();
console.log(green(' ✓ Angular CDK update complete'));
console.log();
console.log(yellow(' ⚠ Please check the output above for any issues that were detected ' +
'but could not be automatically fixed.'));
};
}
+8 -3
View File
@@ -8,6 +8,7 @@
import {Rule} from '@angular-devkit/schematics';
import {TargetVersion, createUpgradeRule, UpgradeTSLintConfig} from '@angular/cdk/schematics';
import {green, yellow} from 'chalk';
import {sync as globSync} from 'glob';
import {materialUpgradeData} from './upgrade-data';
@@ -47,7 +48,11 @@ export function updateToV7(): Rule {
/** Post-update schematic to be called when update is finished. */
export function postUpdate(): Rule {
return () => console.log(
'\nComplete! Please check the output above for any issues that were detected but could not' +
' be automatically fixed.');
return () => {
console.log();
console.log(green(' ✓ Angular Material update complete'));
console.log();
console.log(yellow(' ⚠ Please check the output above for any issues that were detected ' +
'but could not be automatically fixed.'));
};
}