mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-25 00:31:36 +08:00
32 lines
842 B
TypeScript
32 lines
842 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
import { Rule } from '@angular-devkit/schematics';
|
|
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
import {
|
|
NodeDependencyType,
|
|
addPackageJsonDependency,
|
|
} from '../../utility/dependencies';
|
|
import { latestVersions } from '../../utility/latest-versions';
|
|
|
|
|
|
export default function(): Rule {
|
|
return (tree, context) => {
|
|
addPackageJsonDependency(
|
|
tree,
|
|
{
|
|
type: NodeDependencyType.Dev,
|
|
name: '@angular-devkit/build-angular',
|
|
version: latestVersions.DevkitBuildAngular,
|
|
overwrite: true,
|
|
},
|
|
);
|
|
|
|
context.addTask(new NodePackageInstallTask());
|
|
};
|
|
}
|