Husky

Git hooks made easy woof!

README

husky


Modern native Git hooks made easy


Husky improves your commits and more 🐶 woof!

Install


  1. ```
  2. npm install husky --save-dev
  3. ```

Usage


Edit package.json > prepare script and run it once:

  1. ```sh
  2. npm pkg set scripts.prepare="husky install"
  3. npm run prepare
  4. ```

Add a hook:

  1. ```sh
  2. npx husky add .husky/pre-commit "npm test"
  3. git add .husky/pre-commit
  4. ```

Make a commit:

  1. ```sh
  2. git commit -m "Keep calm and commit"
  3. # `npm test` will run
  4. ```

Documentation


https://typicode.github.io/husky