peach a19a732be8 commit message | 2 лет назад | |
---|---|---|
.. | ||
lib | 2 лет назад | |
LICENSE | 2 лет назад | |
README.md | 2 лет назад | |
husky.sh | 2 лет назад | |
package.json | 2 лет назад |
Modern native Git hooks made easy
Husky improves your commits and more 🐶 woof!
npm install husky --save-dev
Edit package.json > prepare
script and run it once:
npm set-script prepare "husky install"
npm run prepare
Add a hook:
npx husky add .husky/pre-commit "npm test"
git add .husky/pre-commit
Make a commit:
git commit -m "Keep calm and commit"
# `npm test` will run