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
Merge branch 'master' into greenkeeper-lodash-4.17.2
* master:
fix(package): "main" property within "package.json" (#409)
style: Add linting using eslint (#406)
ci(appveyor): remove appveyor on finish script
ci(appveyor): disable collection of artifacts
ci(tests): on windows run tests as node4/npm3
ci(travis): update semantic-release to 6.3.5 and update travis config
chore(package): update nyc to version 10.0.0 (#392)
docs(install): Add documentation for installing and running locally (#300)
fix(tests): fix tests when a global config is present (#405)
test(adapter): add test for scoped npm modules
fix(adapter): add support for scoped adapters
docs: Add cz-emoji to tools list (#404)
feat(commit): use OS-specific cache dir for commitizen.json instead of home-or-tmp (#400)
fix(npmignore): ignore more unnecessary files (#393)
docs: add vscode-commitizen to tools list (#397)
Ci issues with commits (#402)
chore(ci): add node versions and say git version in ci
docs: replace sudo mention with link to how to fix EACCES error
Installation is as simple as running the following command (add sudo if on OSX/Linux):
8
+
Installation is as simple as running the following command (if you see `EACCES` error, reading [fixing npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) may help):
9
9
10
10
```
11
11
npm install -g commitizen
@@ -31,7 +31,7 @@ npm install -g commitizen
31
31
Install your preferred `commitizen` adapter globally, for example [`cz-conventional-changelog`](https://www.npmjs.com/package/cz-conventional-changelog)
32
32
33
33
```
34
-
npm i -g cz-conventional-changelog
34
+
npm install -g cz-conventional-changelog
35
35
```
36
36
37
37
Create a `.czrc` file in your `home` directory, with `path` referring to the preferred, globally installed, `commitizen` adapter
@@ -92,6 +92,27 @@ This just tells Commitizen which adapter we actually want our contributors to us
92
92
93
93
Please note that in previous version of Commitizen we used czConfig. **czConfig has been deprecated** and you should migrate to the new format before Commitizen 3.0.0.
94
94
95
+
#### Optional: Install and run Commitizen locally
96
+
97
+
Installing and running Commitizen locally allows you to make sure that developers are running the exact same version of Commitizen on every machine.
98
+
99
+
Install Commitizen with `npm install --save-dev commitizen`.
100
+
101
+
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.
102
+
103
+
You can then initialize the conventional changelog adapter using: `./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact`
104
+
105
+
And you can then add some nice npm run scripts in your package.json pointing to the local version of commitizen:
106
+
107
+
```json
108
+
...
109
+
"scripts": {
110
+
"commit": "git-cz"
111
+
}
112
+
```
113
+
114
+
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!
115
+
95
116
#### Congratulations your repo is Commitizen-friendly. Time to flaunt it!
96
117
97
118
Add the Commitizen-friendly badge to your README using the following markdown:
@@ -181,6 +202,8 @@ We know that every project and build process has different requirements so we've
To create an adapter, just fork one of these great adapters and modify it to suit your needs. We pass you an instance of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/) but you can capture input using whatever means necessary. Just call the `commit` callback with a string and we'll be happy. Publish it to npm, and you'll be all set!
0 commit comments