Files
yudao-ui-admin-vben/scripts/vsh
xingyu4j dc3865f778 fix: 优化 lint 执行策略并修复 pre-commit 依赖解析
- vsh lint 按硬件自适应:CPU<=4 核串行(汇总错误),>4 核并行;
  CPU>4 且空闲内存>8GB 时 oxfmt/oxlint 默认线程数提升至 4,否则维持 2
- lefthook pre-commit 改为串行执行,避免与 check:type 并行导致低配机资源飙升
- pre-commit 仅对暂存文件 lint 并自动修复回填(stage_fixed)
- lint 命令统一加 pnpm exec 前缀,修复 lefthook 经 sh 调用时
  oxlint 找不到 workspace 局部依赖(eslint-plugin-eslint-comments)的问题
2026-06-18 16:35:27 +08:00
..
2024-05-19 21:20:42 +08:00

@vben/vsh

一个 Shell 脚本工具集合,用于 Vue Vben Admin 项目的开发和管理。

功能特性

  • 🚀 基于 Node.js 的现代化 Shell 工具
  • 📦 支持模块化开发和按需加载
  • 🔍 提供依赖检查和分析功能
  • 🔄 支持循环依赖扫描
  • 📝 提供包发布检查功能

安装

# 使用 pnpm 安装
pnpm add -D @vben/vsh

# 或者使用 npm
npm install -D @vben/vsh

# 或者使用 yarn
yarn add -D @vben/vsh

使用方法

全局安装

# 全局安装
pnpm add -g @vben/vsh

# 使用 vsh 命令
vsh [command]

本地使用

# 在 package.json 中添加脚本
{
  "scripts": {
    "vsh": "vsh"
  }
}

# 运行命令
pnpm vsh [command]

命令列表

  • vsh check-deps: 检查项目依赖
  • vsh scan-circular: 扫描循环依赖
  • vsh publish-check: 检查包发布配置