Skip to content

Commit e7302c1

Browse files
author
方永乐
committed
docs($compile): add changelog doc
add changelog doc for install, init, useage,etc.
1 parent 42dff04 commit e7302c1

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,34 @@ For web site developer who wants to use React.
7272

7373
## Changelog
7474

75+
### Install
76+
77+
```bash
78+
npm run changelog:install
79+
```
80+
81+
### First time
82+
83+
```bash
84+
npm run changelog:first
85+
```
86+
87+
### Usage
88+
89+
```bash
90+
// commit every change.
91+
npm run commit
92+
93+
// generate changelog
94+
npm run changelog
95+
```
96+
97+
Create a `.czrc` file in your `home` directory, with path referring to the preferred, globally installed, `commitizen` adapter
98+
```bash
99+
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
100+
```
101+
You are all set! Now cdinto any `git` repository and use `git cz` instead of `git commit` and you will find the `commitizen` prompt.
102+
103+
> Protip: You can use all the `git commit` options with `git cz`, for example: `git cz -a`.
104+
75105
[CHANGELOG](/CHANGELOG.md)

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8+
"changelog:install": "cnpm install -g standard-changelog; cnpm install -g commitizen; cnpm install -g cz-conventional-changelog;",
9+
"changelog:first": "standard-changelog --first-release;",
10+
"changelog": "standard-changelog",
11+
"commit": "git add . && git cz",
812
"analyse": "gulp clean && gulp analyse",
913
"dev": "gulp clean && gulp dev",
1014
"rebuild-icon": "gulp rebuild-icon"

0 commit comments

Comments
 (0)