feat(schematics): add install task for ngrx schematics
This commit is contained in:
parent
edba67f728
commit
6560db75f7
@ -24,6 +24,7 @@ import {
|
||||
RequestContext
|
||||
} from './rules';
|
||||
import { formatFiles } from '../../utils/rules/format-files';
|
||||
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
||||
|
||||
/**
|
||||
* Rule to generate the Nx 'ngrx' Collection
|
||||
@ -57,7 +58,7 @@ export default function generateNgrxCollection(_options: Schema): Rule {
|
||||
]
|
||||
: [];
|
||||
const packageJsonModification = !options.skipPackageJson
|
||||
? [addNgRxToPackageJson()]
|
||||
? [addNgRxToPackageJson(), addInstallTask]
|
||||
: [];
|
||||
|
||||
return chain([
|
||||
@ -69,6 +70,10 @@ export default function generateNgrxCollection(_options: Schema): Rule {
|
||||
};
|
||||
}
|
||||
|
||||
function addInstallTask(_, context: SchematicContext) {
|
||||
context.addTask(new NodePackageInstallTask());
|
||||
}
|
||||
|
||||
// ********************************************************
|
||||
// Internal Function
|
||||
// ********************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user