This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to npm. Read Use Angular Schematics to Simplify Your Life to see how this example was created. You can also watch a screencast on YouTube.
Prerequisites: Node.js 10.
Clone this application to your local hard drive using Git.
git clone https://github.com/oktadeveloper/okta-angular-schematics-example.git schematics-example
cd schematics-example
npm i
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.
Check the documentation with
schematics --help
npm run test
will run the unit tests, using Jasmine as a runner and test framework.
To publish, simply do:
npm run build
npm publish
That's it!
This example uses the following open source libraries:
Please post any questions as comments on the blog post, or visit our Okta Developer Forums.
Apache 2.0, see LICENSE.