Skip to content

Commit a1e48c4

Browse files
committed
feat(git): 添加git hook
添加githook 规范commit和支持change log
1 parent e5735d9 commit a1e48c4

File tree

4 files changed

+1242
-49
lines changed

4 files changed

+1242
-49
lines changed

.commitlintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'type-enum': [2, 'always', [
5+
"feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"
6+
]],
7+
'subject-full-stop': [0, 'never'],
8+
'subject-case': [0, 'never']
9+
}
10+
};

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# (2020-06-18)
2+
3+
4+

package.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,26 @@
1111
"lib:watch": "yarn workspace @lljj/vue-json-schema-form watch",
1212
"lib:build": "yarn workspace @lljj/vue-json-schema-form build",
1313
"demo:dev": "yarn workspace demo dev",
14-
"demo:build": "yarn workspace demo build"
14+
"demo:build": "yarn workspace demo build",
15+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2"
1516
},
16-
"dependencies": {
17+
"config": {
18+
"commitizen": {
19+
"path": "./node_modules/cz-conventional-changelog"
20+
}
21+
},
22+
"dependencies": {},
23+
"husky": {
24+
"hooks": {
25+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
26+
}
1727
},
1828
"devDependencies": {
29+
"@commitlint/cli": "^8.3.5",
30+
"@commitlint/config-conventional": "^8.3.4",
31+
"conventional-changelog-cli": "^2.0.34",
32+
"commitizen": "^4.1.2",
33+
"cz-conventional-changelog": "^3.2.0",
34+
"husky": "^4.2.5"
1935
}
2036
}

0 commit comments

Comments
 (0)