Skip to content

Commit f0c5d8d

Browse files
committed
chore(commits): adds commitizen, commit lint and husky
re #175
1 parent cdb8bcd commit f0c5d8d

File tree

2 files changed

+1126
-23
lines changed

2 files changed

+1126
-23
lines changed

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,30 @@
1515
"local-types"
1616
],
1717
"scripts": {
18+
"commit": "cz",
1819
"prepublishOnly": "yarn build",
1920
"start": "parcel examples/index.html --out-dir temp/server --cache-dir temp/cache ",
2021
"build": "yarn build:rollup && yarn build:tsc",
2122
"build:rollup": " rollup --config config/rollup.config.js",
2223
"build:tsc": "ts-node config/move-files.ts"
2324
},
25+
"husky": {
26+
"hooks": {
27+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
28+
"pre-commit": "yarn build",
29+
"pre-push": "yarn build"
30+
}
31+
},
32+
"config": {
33+
"commitizen": {
34+
"path": "./node_modules/cz-conventional-changelog"
35+
}
36+
},
37+
"commitlint": {
38+
"extends": [
39+
"@commitlint/config-conventional"
40+
]
41+
},
2442
"peerDependencies": {
2543
"react": "^16.9.0",
2644
"react-dom": "^16.9.0"
@@ -32,6 +50,8 @@
3250
"tiny-invariant": "^1.0.6"
3351
},
3452
"devDependencies": {
53+
"@commitlint/cli": "^11.0.0",
54+
"@commitlint/config-conventional": "^11.0.0",
3555
"@fortawesome/fontawesome-svg-core": "^1.2.25",
3656
"@fortawesome/free-solid-svg-icons": "^5.11.2",
3757
"@fortawesome/react-fontawesome": "^0.1.7",
@@ -44,8 +64,11 @@
4464
"@types/react-dom": "16.9.0",
4565
"@types/styled-components": "^4.1.19",
4666
"cheerio": "^1.0.0-rc.3",
67+
"commitizen": "^4.2.1",
4768
"copy-dir": "^1.2.0",
69+
"cz-conventional-changelog": "^3.3.0",
4870
"doctoc": "^1.4.0",
71+
"husky": "^4.3.0",
4972
"json-beautify": "^1.1.1",
5073
"parcel-bundler": "^1.12.4",
5174
"react": "^16.9.0",

0 commit comments

Comments
 (0)