Skip to content

Commit 64827f2

Browse files
committed
fix: group packages in schematics, add min requirements, furthe reading
1 parent 2b02e00 commit 64827f2

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

packages/schematics/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ npm publish
2525
```
2626

2727
That's it!
28-
28+
29+
30+
#### Futher Reading
31+
32+
- https://brianflove.com/2018/12/11/angular-schematics-tutorial/
33+
- `ng update --registry http://myregistry.org`: https://github.com/angular/angular-cli/issues/10624
34+
- ng update command: https://github.com/angular/angular-cli/blob/master/docs/specifications/update.md#library-developers

packages/schematics/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"name": "schematics",
2+
"name": "@sparkles/schematics",
33
"version": "0.0.0",
44
"description": "Sample schematics",
5+
"license": "MIT",
56
"scripts": {
67
"build": "../../node_modules/.bin/tsc -p tsconfig.lib.json",
78
"test": "npm run build && jasmine src/**/*_spec.js",
@@ -10,11 +11,17 @@
1011
"keywords": [
1112
"schematics"
1213
],
13-
"author": "",
14-
"license": "MIT",
1514
"schematics": "./src/collection.json",
1615
"ng-update": {
17-
"migrations": "./src/migration.json"
16+
"migrations": "./src/migration.json",
17+
"packageGroup": [
18+
"@sparkles/components",
19+
"@sparkles/styles",
20+
"@sparkles/schematics"
21+
],
22+
"requirements": {
23+
"@sparkles/schematics": ">= 1"
24+
}
1825
},
1926
"dependencies": {
2027
"@angular-devkit/core": "^7.3.8",

packages/schematics/src/ng-update/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
2+
import { updateJsonInTree } from '@nrwl/schematics/src/utils/ast-utils';
23

34
export function updateToV1(): Rule {
45
return (tree: Tree, _context: SchematicContext) => {

0 commit comments

Comments
 (0)