Skip to content

Commit 7e916a6

Browse files
hanslfilipesilva
authored andcommitted
fix(@schematics/angular): run node package install task after generate library
Fix angular/angular-cli#10216
1 parent 9d00497 commit 7e916a6

File tree

1 file changed

+4
-0
lines changed
  • packages/schematics/angular/library

1 file changed

+4
-0
lines changed

packages/schematics/angular/library/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
template,
2121
url,
2222
} from '@angular-devkit/schematics';
23+
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
2324
import { WorkspaceSchema, getWorkspace, getWorkspacePath } from '../utility/config';
2425
import { latestVersions } from '../utility/latest-versions';
2526
import { Schema as LibraryOptions } from './schema';
@@ -219,6 +220,9 @@ export default function (options: LibraryOptions): Rule {
219220
flat: true,
220221
path: sourceDir,
221222
}),
223+
(_tree: Tree, context: SchematicContext) => {
224+
context.addTask(new NodePackageInstallTask());
225+
},
222226
])(host, context);
223227
};
224228
}

0 commit comments

Comments
 (0)