Skip to content

Commit fbea6d2

Browse files
committed
feat(commit): add commit message specification
The project commit message is constrained by the commit message specification of the angrular team implemented by commitizen. At the sametime, the message format is verified when the commit is submitted.
1 parent d06c9cb commit fbea6d2

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.commitlintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- '@commitlint/config-conventional'

.czrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "path": "cz-conventional-changelog" }

.huskyrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hooks:
2+
commit-msg: 'commitlint -E HUSKY_GIT_PARAMS'

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,17 @@
2727
"mili": "./bin/mili"
2828
},
2929
"scripts": {
30-
"clean": "rm -rf ./dist/*"
30+
"clean": "rm -rf ./dist/*",
31+
"ca": "git add -A && git-cz -av",
32+
"commit": "git-cz"
33+
},
34+
"devDependencies": {
35+
"@commitlint/cli": "^7.1.2",
36+
"@commitlint/config-conventional": "^7.1.2",
37+
"commitizen": "^2.10.1",
38+
"cz-conventional-changelog": "^2.1.0",
39+
"husky": "^1.0.1"
3140
},
32-
"devDependencies": {},
3341
"dependencies": {
3442
"chalk": "^2.3.2",
3543
"commander": "^2.15.1",

0 commit comments

Comments
 (0)