Skip to content

Commit 8c7a7c5

Browse files
authored
refactor: add conventional changelog (#730)
1 parent df02b7f commit 8c7a7c5

File tree

5 files changed

+1703
-17
lines changed

5 files changed

+1703
-17
lines changed

.commitlintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"body-max-line-length": [0]
5+
}
6+
}

.czrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "./node_modules/cz-conventional-changelog"
3+
}

.github/workflows/commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Commit
2+
on:
3+
push:
4+
jobs:
5+
conventional-commit:
6+
runs-on: ubuntu-latest
7+
name: Checking commit name
8+
steps:
9+
- name: Checkout the repository
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Run commitlint
14+
uses: wagoid/commitlint-github-action@v4

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@
5555
"e2e": "node test/e2e/runner.js",
5656
"test": "npm run unit",
5757
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs",
58-
"release": "cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js",
58+
"release": "cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js && standard-version",
5959
"prepublishOnly": "yarn run lint && yarn run test && yarn run build",
6060
"docs:dev": "vuepress dev docs",
61-
"docs:build": "vuepress build docs"
61+
"docs:build": "vuepress build docs",
62+
"commit": "cz"
6263
},
6364
"peerDependencies": {
6465
"chart.js": ">= 2.5"
@@ -71,15 +72,19 @@
7172
"@babel/core": "^7.0.0-beta.42",
7273
"@babel/preset-env": "^7.0.0-beta.42",
7374
"@babel/preset-stage-2": "^7.0.0-beta.42",
75+
"@commitlint/cli": "^15.0.0",
76+
"@commitlint/config-conventional": "^15.0.0",
7477
"@types/chart.js": "^2.7.55",
7578
"babel-loader": "8.0.0-beta.0",
7679
"chai": "^3.5.0",
7780
"chart.js": "^2.8.0",
7881
"chromedriver": "^2.28.0",
82+
"commitizen": "^4.2.4",
7983
"connect-history-api-fallback": "^1.1.0",
8084
"cross-env": "^5.1.1",
8185
"cross-spawn": "^5.1.0",
8286
"css-loader": "^0.28.0",
87+
"cz-conventional-changelog": "3.3.0",
8388
"eslint": "^3.19.0",
8489
"eslint-config-standard": "^10.2.1",
8590
"eslint-friendly-formatter": "^2.0.7",
@@ -121,6 +126,7 @@
121126
"shelljs": "^0.7.7",
122127
"sinon": "^2.1.0",
123128
"sinon-chai": "^2.9.0",
129+
"standard-version": "^9.3.2",
124130
"url-loader": "^0.5.8",
125131
"vue": "2.5.17",
126132
"vue-hot-reload-api": "2.3.1",

0 commit comments

Comments
 (0)