Skip to content

Commit 5119c33

Browse files
committed
chore: 更新构建配置 😩😩😩
1 parent 1c14c28 commit 5119c33

File tree

8 files changed

+1430
-10
lines changed

8 files changed

+1430
-10
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"comment-directive": "off"
66
}
77
}
8-
}
8+
}

.gitignore

-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
11
node_modules
2-
/node_modules
32
dist
4-
5-
npm-debug.log*
6-
yarn-debug.log*
7-
yarn-error.log*
8-
pnpm-debug.log*
9-
pnpm-debug.log

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm exec lint-staged
5+
npm exec pretty-quick --staged

commitlint.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Configuration = {
2+
extends: ['@commitlint/config-conventional'] as const
3+
} as const
4+
5+
export default Configuration

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Web Component</title>
7+
<title>Web Components</title>
88
</head>
99

1010
<body>

package.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@
77
"dev": "vite",
88
"build": "vite build",
99
"lint": "eslint .",
10-
"lint:fix": "eslint . --fix"
10+
"lint:fix": "eslint . --fix",
11+
"commit": "cz"
1112
},
1213
"keywords": [],
1314
"author": "",
1415
"license": "MIT",
1516
"devDependencies": {
17+
"@commitlint/cli": "^17.1.2",
18+
"@commitlint/config-conventional": "^17.1.0",
1619
"@fighting-design/eslint-config": "^0.1.1",
1720
"@types/node": "^18.11.4",
21+
"commitizen": "^4.2.5",
22+
"cz-conventional-changelog": "^3.3.0",
1823
"eslint": "^8.26.0",
24+
"husky": "^8.0.1",
1925
"typescript": "^4.8.4",
2026
"vite": "^3.1.8"
27+
},
28+
"config": {
29+
"commitizen": {
30+
"path": "./node_modules/cz-conventional-changelog"
31+
}
2132
}
2233
}

0 commit comments

Comments
 (0)