@moventes/ng-schematics
v12.0.0
Published
Angular schematics for the Moventes team
Readme
Moventes NgSchematics
This repository contains the schematics for the Moventes team.
It was created from the Angular basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
Our schematics
vscode-setup
This schematic copies configuration files into your VSCode project.
It contains :
- VSCode: extensions, settings and lauch configurations
- Prettier config
- EditorConfig (with a fix for Windows and Linux compatibility)
- ESLint config (only the root
.eslintrc.jsonfile) - Husky pre-commit hook to run prettier + eslint on staged files
How to use it
To use a schematic in your project :
- install this project as a dev-dependency :
npm i --save-dev @moventes/ng-schematics@latest- run the schematic with the Angular CLI
generatecommand.
For example, if you want to run thevscode-setupschematic :
ng generate @moventes/ng-schematics:vscode-setupDevelopment process
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 --helpUnit 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
npm publish --access public