@jaredtokuz/dry-schematics v1.0.11
dry-schematics
leveraging angular schematics and a repository of reusable code with the aim to generate standardized code and get right to the custom code
Setting up global configurations
nvm use 14.18
npm install -g @angular-devkit/schematics-cli
**optional npm i -g @angular/cli
Setting up a collection of schematics
schematics blank --name= create a schema.json in the schematic folder add schema property to the collection.json
...
https://blog.angular.io/schematics-an-introduction-dc1dfbc2a2b2
npm run build
Using the schematics in a project
schematics {path/to/schematic/collection}:{schematic-name} args (ex: --name:testyo or testyo (argv index))
OR only allowed in angular project directories
npm link {path/to/schematic/collection}
ng generate {schematic package.json name}:{schematic-name}
Other dependencies
linux: jq, sponge
Angular schematic Readme...
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
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
Unit Testing
npm run test
will run the unit tests, using Jasmine as a runner and test framework.
Publishing
To publish, simply do:
npm run build
./tools/publish.sh
That's it!