Skip to content

Commit c555288

Browse files
author
微信公众号:储凡
authored
Merge pull request #115 from 142vip/feat/git-hooks
feat: 使用`simple-git-hooks`模块配置钩子函数,规范仓库内容
2 parents d0ab896 + 5698a96 commit c555288

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"scripts": {
1919
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/*",
20-
"postinstall": "pnpm build:mark-map",
20+
"postinstall": "simple-git-hooks",
2121
"clean": "npx fa clean --ignore-tips --dist --vite --all",
2222
"lint": "npx fa lint",
2323
"lint:fix": "npx fa lint --fix",
@@ -39,12 +39,17 @@
3939
"mermaid": "^10.9.1",
4040
"only-allow": "^1.2.1",
4141
"sass-embedded": "^1.79.5",
42+
"simple-git-hooks": "^2.11.1",
4243
"typescript": "^5.5.4",
4344
"vercel": "^32.7.2",
4445
"vue": "^3.5.8",
4546
"vuepress": "^2.0.0-rc.17",
4647
"vuepress-plugin-search-pro": "^2.0.0-rc.57",
4748
"vuepress-theme-hope": "^2.0.0-rc.58",
4849
"xmind-embed-viewer": "^1.2.0"
50+
},
51+
"simple-git-hooks": {
52+
"pre-commit": "pnpm lint:fix",
53+
"prepare-commit-msg": "pnpm build"
4954
}
5055
}

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)