UNPKG

ng-alain

Version:

Schematics specific to NG-ALAIN

25 lines (20 loc) 804 B
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { logFinished, logInfo } from '../../../utils'; import { UpgradeMainVersions } from '../../../utils/versions'; function finished(): Rule { return (_tree: Tree, context: SchematicContext) => { context.addTask(new NodePackageInstallTask()); logFinished( context, `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2562` ); }; } export function v20Rule(): Rule { return async (tree: Tree, context: SchematicContext) => { UpgradeMainVersions(tree); logInfo(context, `Upgrade dependency version number`); return chain([finished()]); }; }