Getting Started With Schematics
This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
Testing and install
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.
$ npm install @angular-devkit/schematics-cli
Check the documentation with
schematics --help
Unit Testing
npm run test
will run the unit tests, using Jasmine as a runner and test framework.
Running
To run, simply do:
npm install first-schema
and into your project do:
ng g first-schema:first-schema --name="some name" --path="some name"
and if you want generate on a path specific, use: --source-dir=you path especific
example:
ng g first-schema:first-schema --name="some name" --path="some name" --source-dir=src/app/some folder
That's it! :)