Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieljancar/husky-demo
A simple demo on using husky as a Git hook on your codebase. πΊπΎ
https://github.com/danieljancar/husky-demo
cicd codebase git-hooks husky
Last synced: about 2 months ago
JSON representation
A simple demo on using husky as a Git hook on your codebase. πΊπΎ
- Host: GitHub
- URL: https://github.com/danieljancar/husky-demo
- Owner: danieljancar
- License: mit
- Created: 2023-12-14T14:20:13.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-01-05T06:56:47.000Z (12 months ago)
- Last Synced: 2024-01-05T07:41:18.977Z (12 months ago)
- Topics: cicd, codebase, git-hooks, husky
- Language: HTML
- Homepage:
- Size: 1.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Husky Demo
Simple integration of Husky for pre-commit hooks, linting, and formatting. Showcased in a simple Angular project.
---
## Getting Started
### Prerequisites
- [Node.js](https://nodejs.org/en/)
- [Angular CLI](https://cli.angular.io/)## Setting up Husky
### Install Husky
```bash
npm install --save-dev husky
npx husky install
```### Add pre-commit hook
```bash
npx husky add .husky/pre-commit "npm run lint"
```## Result
When trying to commit, the pre-commit hook will build, test and lint the code. If there are any errors, the commit will be aborted.
## References
- [Presentation TechTalk](static/Husky%20Techtalk.pptx)
- [Youtube video from Angular Nation](https://www.youtube.com/watch?v=FvfAXG92UqY&ab_channel=AngularNation)