starter-cleaner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStarter Cleaner
Starter Cleaner
使用随技能提供的确定性脚本清理 v2,保留基础页面、Wot UI、 和 能力。
wot-starteruni-echartsechartsUse the deterministic script provided with the skill to clean v2 while retaining basic pages, Wot UI, , and capabilities.
wot-starteruni-echartsecharts执行流程
Execution Workflow
-
在项目根目录运行,确认并告知用户未提交改动会被保留,但待清理目录中的改动会随目录一起删除。
git status --short -
如果用户尚未明确要求执行清理,先说明这是破坏性操作并取得确认。
-
先预览清理计划:sh
node .agents/skills/starter-cleaner/scripts/clean.js --dry-run -
确认目标是v2 后执行。脚本会删除旧的
wot-starter,然后受控运行src/pages.json,等新的最小pnpm dev:h5生成后退出 dev server:src/pages.jsonshnode .agents/skills/starter-cleaner/scripts/clean.js -
执行更新锁文件,再运行
pnpm install --lockfile-only和pnpm type-check。如果依赖不可用,至少检查pnpm lint和清理后的 diff,并将未运行的验证明确告知用户。git diff --check
-
Runin the project root, then confirm with the user that uncommitted changes will be preserved, although changes within the directories scheduled for cleanup will be deleted along with those directories.
git status --short -
If the user has not explicitly requested the cleanup, first explain that this is a destructive operation and obtain confirmation.
-
Preview the cleanup plan:sh
node .agents/skills/starter-cleaner/scripts/clean.js --dry-run -
After confirming that the target isv2, execute the cleanup. The script deletes the old
wot-starter, then runssrc/pages.jsonin a controlled manner and exits the dev server after the new minimalpnpm dev:h5is generated:src/pages.jsonshnode .agents/skills/starter-cleaner/scripts/clean.js -
Runto update the lock file, then run
pnpm install --lockfile-onlyandpnpm type-check. If the dependencies are unavailable, at least inspectpnpm lintand the cleaned diff, and explicitly inform the user which validation steps were not run.git diff --check
清理范围
Cleanup Scope
脚本执行以下操作,且支持重复运行:
- 删除 、
docs/、src/subPages/、src/subEcharts/。src/subAsyncEcharts/ - 删除旧的 ,再通过
src/pages.json触发pnpm dev:h5重新生成最小页面配置。vite-plugin-uni-pages - 删除 ,将项目从文档 workspace 恢复为单包项目。
pnpm-workspace.yaml - 从 的
vite.config.ts配置中移除上述三个示例分包入口。UniHelperPages - 从 中移除
package.json与docs:*脚本。lint:docs - 保留 、
uni-echarts依赖和相关 Vite 配置,方便业务继续使用图表。echarts
The script performs the following operations and supports repeated execution:
- Deletes ,
docs/,src/subPages/, andsrc/subEcharts/.src/subAsyncEcharts/ - Deletes the old , then triggers
src/pages.jsonthroughvite-plugin-uni-pagesto regenerate a minimal page configuration.pnpm dev:h5 - Deletes , restoring the project from a documentation workspace to a single-package project.
pnpm-workspace.yaml - Removes the three example subpackage entry points above from the configuration in
UniHelperPages.vite.config.ts - Removes the and
docs:*scripts fromlint:docs.package.json - Retains the and
uni-echartsdependencies and their related Vite configurations so that charts remain available for business use.echarts
安全约束
Safety Constraints
- 不直接拼接或扩展删除路径;仅使用脚本内的固定清单。
- 不在非 v2 项目中运行。仅在用户明确确认目标项目后使用
wot-starter跳过项目身份检查。--force - 不用 绕过未提交改动提示;该参数只用于项目身份检查。
--force
- Do not directly concatenate or expand deletion paths; use only the fixed list in the script.
- Do not run in projects other than v2. Use
wot-starterto skip the project identity check only after the user has explicitly confirmed the target project.--force - Do not use to bypass the uncommitted changes warning; this parameter is intended only for the project identity check.
--force