Run on an Angular project generated by the Angular CLI in version 6+.
$ npm install @bentah/schematics
This schematics will install the following librairies and configure your app to use them :
- husky: To use git hooks
- commitizen: To format your git commits
- cz-customizable: A customizable commitizen adapter
- lint-staged: To run linters against staged git files and don't let 💩 slip into your code base!
- prettier: An opinionated code formatter
$ ng g @bentah/schematics:tooling-git
Then you will have to use npm run commit to perform your commits.
What happen when you use npm run commit ?
First, thanks to husky, a precommit hook will be run. It will launch lint-staged in order to perform tslint and prettier on the staged files. Then, thanks to commitizen, you'll be prompted to fill in any required fields and your commit messages will be formatted according to the standards.
Enjoy 👌
Configure your angular application to use lite-server
$ ng g @bentah/schematics:lite-server
Configure your angular application to use webpack-analyser-bundle
$ ng g @bentah/schematics:webpack-analyser-bundle