Skip to content

Commit

Permalink
fix(ng-add): install added packages (#11163)
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and josephperrott committed May 7, 2018
1 parent 81b6a78 commit be08eb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/schematics/shell/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {chain, noop, Rule, Tree} from '@angular-devkit/schematics';
import {chain, noop, Rule, Tree, SchematicContext} from '@angular-devkit/schematics';
import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks';
import {addModuleImportToRootModule, getStylesPath} from '../utils/ast';
import {InsertChange} from '../utils/devkit-utils/change';
import {getProjectFromWorkspace, getWorkspace} from '../utils/devkit-utils/config';
Expand Down Expand Up @@ -27,10 +28,11 @@ export default function(options: Schema): Rule {

/** Add material, cdk, annimations to package.json if not already present. */
function addMaterialToPackageJson() {
return (host: Tree) => {
return (host: Tree, context: SchematicContext) => {
addPackageToPackageJson(host, 'dependencies', '@angular/cdk', cdkVersion);
addPackageToPackageJson(host, 'dependencies', '@angular/material', materialVersion);
addPackageToPackageJson(host, 'dependencies', '@angular/animations', angularVersion);
context.addTask(new NodePackageInstallTask());
return host;
};
}
Expand Down

0 comments on commit be08eb9

Please sign in to comment.