From 0db21709389c2e4f578cdc2ea987ef05d58bf7c4 Mon Sep 17 00:00:00 2001 From: Richard Zilahi Date: Mon, 8 Mar 2021 22:02:33 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 698ce2b2..5130d5ea 100644 --- a/README.md +++ b/README.md @@ -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": { @@ -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! From 7e0a2e7a468434f4f3b8e8f4d35f67f2b612a027 Mon Sep 17 00:00:00 2001 From: Richard Zilahi Date: Mon, 8 Mar 2021 22:05:14 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5130d5ea..58129563 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,9 @@ 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`: +*Prior `husky` v5*: + +For `husky` users, add the following configuration to the project's `package.json`: ```json "husky": { @@ -167,9 +169,9 @@ exec < /dev/tty && node_modules/.bin/cz --hook || true } ``` -*with husky >= v5* +*with husky >= v5*: -In [`husky v5`]() you need to call the locally instared binaries using `npx` +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`: