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 all commits
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ exec < /dev/tty && node_modules/.bin/cz --hook || true

##### Husky

*Prior `husky` v5*:

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

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

*with husky >= v5*:

In [`husky v5`](https://typicode.github.io/husky/#/?id=announcement) 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