You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,14 @@ The above command does three things for you.
86
86
}
87
87
```
88
88
89
+
Alternatively, commitizen configs may be added to a .czrc file:
90
+
91
+
```json
92
+
{
93
+
"path": "cz-conventional-changelog"
94
+
}
95
+
```
96
+
89
97
This just tells Commitizen which adapter we actually want our contributors to use when they try to commit to this repo.
90
98
91
99
`commitizen.path` is resolved via [require.resolve](https://nodejs.org/api/globals.html#globals_require_resolve) and supports
@@ -125,7 +133,7 @@ And you can then add some nice npm run scripts in your package.json pointing to
125
133
126
134
This will be more convenient for your users because then if they want to do a commit, all they need to do is run `npm run commit` and they will get the prompts needed to start a commit!
127
135
128
-
> **NOTE:** if you are using `precommit` hooks thanks to something like `husky`, you will need to name your script some thing other than "commit" (e.g. "cm": "git-cz"). The reason is because npm-scripts has a "feature" where it automatically runs scripts with the name *prexxx* where *xxx* is the name of another script. In essence, npm and husky will run "precommit" scripts twice if you name the script "commit," and the work around is to prevent the npm-triggered *precommit* script.
136
+
> **NOTE:** if you are using `precommit` hooks thanks to something like `husky`, you will need to name your script some thing other than "commit" (e.g. "cm": "git-cz"). The reason is because npm-scripts has a "feature" where it automatically runs scripts with the name _prexxx_ where _xxx_ is the name of another script. In essence, npm and husky will run "precommit" scripts twice if you name the script "commit," and the work around is to prevent the npm-triggered _precommit_ script.
0 commit comments