🤡 细节优化

This commit is contained in:
等风来
2024-06-13 18:18:16 +08:00
parent 3b7520f2ea
commit 86282dd195
3 changed files with 4 additions and 13 deletions

View File

@@ -1,10 +0,0 @@
#!/bin/bash
echo
echo -e "\e[1;36m-----------使用GitMoji-cli编辑提交------------\e[0m"
echo " 遵循 Gitmoji"
echo " https://gitmoji.dev/"
echo -e "\e[1;36m----------------------------------------------\e[0m"
# exec < /dev/tty
pnpm gitmoji --hook $1 $2

View File

@@ -45,9 +45,9 @@ pnpm husky
```sh
git add .
git commit
pnpm run commit
```
在提交时Husky 会自动运行预定义的 Git 钩子脚本,包括对代码规范的检测。
在提交时Husky 会自动运行预定义的 Git 钩子脚本,包括对代码规范的检测,同时会使用[gitmoji-cli](https://github.com/carloscuesta/gitmoji)进行交互式提交
3. 如果提交的代码不符合项目的规范要求,您将会收到相应的错误提示。请根据提示信息进行修改和调整,直到提交的代码符合要求。

View File

@@ -7,7 +7,8 @@
"scripts": {
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"lint": "lint-staged --allow-empty"
"lint": "lint-staged --allow-empty",
"commit": "gitmoji --commit"
},
"repository": {
"type": "git",