Skip to content

Commit dcdacd4

Browse files
committed
feat(template): add commit message specification
All template's 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. #6
1 parent fc447c0 commit dcdacd4

File tree

16 files changed

+50
-7
lines changed

16 files changed

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

template/assist-plugin/.czrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "path": "cz-conventional-changelog" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
hooks:
22
pre-commit: 'npm test'
3+
commit-msg: 'commitlint -E HUSKY_GIT_PARAMS'

template/assist-plugin/package.json.mustache

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"clean": "rm -rf ./dist/*",
1010
"build": "npm run clean & webpack",
1111
"prepublishOnly": "npm test; npm run build",
12+
"ca": "git add -A && git-cz -av",
13+
"commit": "git-cz",
1214
},
1315
"engines": {
1416
"node": ">=8.9.4"
@@ -53,7 +55,11 @@
5355
"webpack-bundle-analyzer": "^2.11.1",
5456
"webpack-cli": "^2.0.14",
5557
"webpack-merge": "^4.1.2",
56-
"webpack-node-externals": "^1.7.2"
58+
"webpack-node-externals": "^1.7.2",
59+
"commitizen": "^2.10.1",
60+
"cz-conventional-changelog": "^2.1.0",
61+
"@commitlint/cli": "^7.1.2",
62+
"@commitlint/config-conventional": "^7.1.2"
5763
},
5864
"dependencies": {},
5965
"postcss": {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- '@commitlint/config-conventional'

template/component/.czrc

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

template/component/.huskyrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
hooks:
22
pre-commit: 'npm test'
3+
commit-msg: 'commitlint -E HUSKY_GIT_PARAMS'

template/component/package.json.mustache

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"mili:upgrade": "mili upgrade",
1111
"clean": "rm -rf ./dist/*",
1212
"build": "npm run clean & rollup -c",
13-
"prepublishOnly": "npm test; npm run build"
13+
"prepublishOnly": "npm test; npm run build",
14+
"ca": "git add -A && git-cz -av",
15+
"commit": "git-cz"
1416
},
1517
"engines": { "node": ">=8.9.4" },
1618
"mili": {
@@ -44,7 +46,11 @@
4446
"rollup-plugin-babel": "^3.0.3",
4547
"rollup-plugin-commonjs": "^9.1.0",
4648
"rollup-plugin-json": "^3.0.0",
47-
"rollup-plugin-node-resolve": "^3.3.0"
49+
"rollup-plugin-node-resolve": "^3.3.0",
50+
"commitizen": "^2.10.1",
51+
"cz-conventional-changelog": "^2.1.0",
52+
"@commitlint/cli": "^7.1.2",
53+
"@commitlint/config-conventional": "^7.1.2"
4854
},
4955
"dependencies": {}
5056
}

template/pwa/.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'

template/pwa/.czrc

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

0 commit comments

Comments
 (0)