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
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,18 @@ npm install -g commitizen
14
14
#### Using the command line tool
15
15
Now, simply use `git cz` instead of `git commit` when committing.
16
16
17
+
_Alternatively_, if you are using **NPM 5.2+** you can [use `npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) instead of installing globally:
18
+
```
19
+
npx git-cz
20
+
```
21
+
or as an npm script:
22
+
```json
23
+
...
24
+
"scripts": {
25
+
"commit": "npx git-cz"
26
+
}
27
+
```
28
+
17
29
When you're working in a Commitizen friendly repository, you'll be prompted to fill in any required fields and your commit messages will be formatted according to the standards defined by project maintainers.
18
30
19
31
[](https://github.com/commitizen/cz-cli/raw/master/meta/screenshots/add-commit.png)
@@ -101,7 +113,12 @@ Installing and running Commitizen locally allows you to make sure that developer
101
113
102
114
Install Commitizen with `npm install --save-dev commitizen`.
103
115
104
-
Once you have Commitizen installed as a local dev dependency you can execute `./node_modules/.bin/commitizen` or `./node_modules/.bin/git-cz` in order to actually use the commands.
116
+
On **NPM 5.2+** you can [use `npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) to initialize the conventional changelog adapter:
For **previous versions of NPM (< 5.2) ** you can execute `./node_modules/.bin/commitizen` or `./node_modules/.bin/git-cz` in order to actually use the commands.
105
122
106
123
You can then initialize the conventional changelog adapter using: `./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact`
0 commit comments