### 强制添加 AGENTS.md 到暂存 Source: https://github.com/albusken/shujuku/blob/main/AGENTS.md 当需要提交规则文档时,使用 git add -f 强制添加 AGENTS.md,因为根目录 Markdown 被忽略。 ```bash git add -f -- AGENTS.md ``` -------------------------------- ### 排除 dist 目录的暂存 Source: https://github.com/albusken/shujuku/blob/main/AGENTS.md 发布暂存时先 git add -A,然后使用 git restore --staged 排除 dist 目录,仅排除暂存,不删除或还原本地产物。 ```bash git add -A ``` ```bash git restore --staged -- dist/ ``` -------------------------------- ### 设置构建版本并运行构建 Source: https://github.com/albusken/shujuku/blob/main/AGENTS.md 在 PowerShell 中设置环境变量 ACU_BUILD_VERSION 为 1.2.9,然后运行 npm build 脚本。 ```powershell $env:ACU_BUILD_VERSION='1.2.9'; & npm.cmd run build ``` -------------------------------- ### Windows 下运行 Vitest 测试 Source: https://github.com/albusken/shujuku/blob/main/AGENTS.md 在 Windows 环境下直接调用本地 vitest.cmd 运行指定测试。 ```powershell & .\node_modules\.bin\vitest.cmd run ``` -------------------------------- ### Windows 下运行 TypeScript 类型检查 Source: https://github.com/albusken/shujuku/blob/main/AGENTS.md 在 Windows 环境下直接调用本地 tsc.cmd 进行类型检查,避免全局命令。 ```powershell & .\node_modules\.bin\tsc.cmd --noEmit ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.