diff --git a/README.md b/README.md index 698ce2b2..58129563 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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!