数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
510 B

2 years ago
# husky
> Modern native Git hooks made easy
Husky improves your commits and more 🐶 *woof!*
# Install
```
npm install husky --save-dev
```
# Usage
Edit `package.json > prepare` script and run it once:
```sh
npm pkg set scripts.prepare="husky install"
npm run prepare
```
Add a hook:
```sh
npx husky add .husky/pre-commit "npm test"
git add .husky/pre-commit
```
Make a commit:
```sh
git commit -m "Keep calm and commit"
# `npm test` will run
```
# Documentation
https://typicode.github.io/husky