fix(husky): 在钩子中添加时间跟踪以优化性能
This commit is contained in:
@@ -8,6 +8,6 @@ cat $1
|
|||||||
echo "🟢 [Commit-msg] Node 版本:$(node -v)"
|
echo "🟢 [Commit-msg] Node 版本:$(node -v)"
|
||||||
|
|
||||||
# pnpm exec commitlint --edit $1
|
# pnpm exec commitlint --edit $1
|
||||||
node node_modules/@commitlint/cli/cli.js --edit $1
|
time node node_modules/@commitlint/cli/cli.js --edit $1
|
||||||
|
|
||||||
echo "✅ [Commit-msg] commit-msg 钩子完成!"
|
echo "📝 [Commit-msg] commit-msg 钩子完成!"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# 此钩子在 git merge 或 git pull 成功完成后运行。
|
# 此钩子在 git merge 或 git pull 成功完成后运行。
|
||||||
echo "🔗 [Post-merge] 正在安装依赖..."
|
echo "🔗 [Post-merge] 正在安装依赖..."
|
||||||
pnpm install
|
time pnpm install
|
||||||
echo "✅ [Post-merge] 依赖安装完成!"
|
echo "🔗 [Post-merge] 依赖安装完成!"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# 此钩子在执行 git commit 命令时,在创建提交之前运行。
|
# 此钩子在执行 git commit 命令时,在创建提交之前运行。
|
||||||
echo "🧹 [Pre-commit] 正在运行 lint-staged..."
|
echo "🧹 [Pre-commit] 正在运行 lint-staged..."
|
||||||
pnpm exec lint-staged
|
time pnpm exec lint-staged
|
||||||
echo "✅ [Pre-commit] lint-staged 完成!"
|
echo "🧹 [Pre-commit] lint-staged 完成!"
|
||||||
|
|||||||
Reference in New Issue
Block a user