mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(schematics): better ng-update success message (#13687)
This commit is contained in:
committed by
Joey Perrott
parent
992bcfb179
commit
2f1578478e
@@ -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,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.'));
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user