1 | # Getting Started With Schematics
|
2 |
|
3 | This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
|
4 |
|
5 | ### Testing
|
6 |
|
7 | To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.
|
8 |
|
9 | Check the documentation with
|
10 |
|
11 | ```bash
|
12 | schematics --help
|
13 | ```
|
14 |
|
15 | ### Unit Testing
|
16 |
|
17 | `npm run test` will run the unit tests, using Jasmine as a runner and test framework.
|
18 |
|
19 | ### Publishing
|
20 |
|
21 | To publish, simply do:
|
22 |
|
23 | ```bash
|
24 | npm run build
|
25 | npm publish
|
26 | ```
|
27 |
|
28 | That's it!
|