Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added husky docs for husky >= 5 #813

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update README.md
  • Loading branch information
zilahir committed Mar 8, 2021
commit 0db21709389c2e4f578cdc2ea987ef05d58bf7c4
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ exec < /dev/tty && node_modules/.bin/cz --hook || true

##### Husky

For `husky` users, add the following configuration to the project's `package.json`:
*Prior `husky` v5* For `husky` users, add the following configuration to the project's `package.json`:

```json
"husky": {
Expand All @@ -167,6 +167,16 @@ For `husky` users, add the following configuration to the project's `package.jso
}
```

*with husky >= v5*

In [`husky v5`]() you need to call the locally instared binaries using `npx`

in `.husky/prepare-commit-msg`:

```
exec < /dev/tty && npx --no-install cz --hook || true
```

> **Why `exec < /dev/tty`?** By default, git hooks are not interactive. This command allows the user to use their terminal to interact with Commitizen during the hook.

#### Congratulations your repo is Commitizen-friendly. Time to flaunt it!
Expand Down