I build a simple Angular Schematics called: my-schematics.
I able to add (using angular cli) my-schematics to some project.
The problem when I run ng update my-schematics
I got an error says:
Not found : my-schematic
.
I'm not sure why. this is my collection.json
:
"schematics": {
"update": {
"description": "Updates version test",
"factory": "./ng-update/index#update"
}
}
In the collection.json your schematic is named 'update' instead of my-schematics.
If you want to run your schematic you should
Instead of ng update my-schematics
collection.json Within angular.json you could add the default collection for your schematics:
If you collection is not the default collection, you should run it by
Have a look at https://blog.angular.io/schematics-an-introduction-dc1dfbc2a2b2 to learn more about schematics