feat(schematics) add migration to add affected:lint npm script
This commit is contained in:
parent
1ec9af56fd
commit
e18f94e566
@ -2,8 +2,13 @@
|
||||
"schematics": {
|
||||
"update-to-6.0.0": {
|
||||
"version": "6",
|
||||
"description": " ",
|
||||
"description": "Update to Angular CLI 6 and Nx6",
|
||||
"factory": "./update-6-0-0/update-6-0-0"
|
||||
},
|
||||
"update-to-6.0.5": {
|
||||
"version": "6.0.5",
|
||||
"description": "Add affected:lint npm script",
|
||||
"factory": "./update-6-0-5/update-6-0-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
packages/schematics/migrations/update-6-0-5/update-6-0-5.ts
Normal file
15
packages/schematics/migrations/update-6-0-5/update-6-0-5.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import {
|
||||
Rule,
|
||||
Tree,
|
||||
SchematicContext,
|
||||
chain
|
||||
} from '@angular-devkit/schematics';
|
||||
import { updateJsonInTree } from '../../src/utils/ast-utils';
|
||||
|
||||
export default function(): Rule {
|
||||
return updateJsonInTree('package.json', packageJson => {
|
||||
packageJson.scripts['affected:lint'] =
|
||||
'./node_modules/.bin/nx affected:lint';
|
||||
return packageJson;
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user