In this repo you will see how to extends an existed schematic, in this case the component of @schematics/angular.
To get started, you'll need to install the Schematics CLI and Project Builder CLI. You can do this via npm:
npm install -g @pbuilder/cli
To create a new schematic library project, run:
npx @pbuilder/cli new my-schematic author-1
This command will set up the project structure for your schematics.
To test your schematics locally using the Schematics CLI, run:
schematics [dist-collection-path]:[schematic-name] [options]
Verdaccio is a lightweight private npm proxy registry that you can use to publish and test your schematics locally. Make sure you have Verdaccio installed and running. To publish your schematic to Verdaccio, add the following npm script to your package.json:
"scripts": {
"publish:verdaccio": "npm publish --registry http://localhost:4873"
}
To publish and test your schematic:
- Start Verdaccio:
npx verdaccio
- Publish your schematic to Verdaccio:
npm run publish:verdaccio
- Install and execute your schematic from Verdaccio:
npm install my-schematic --registry http://localhost:4873
schematics my-schematic:my-rule
For more detailed instructions and options, visit the Schematics Documentation.
We welcome contributions! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.