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 up v2, retaining basic pages, Wot UI, and capabilities.
wot-starteruni-echartsecharts执行流程
Execution Process
-
在项目根目录运行,确认并告知用户未提交改动会被保留,但待清理目录中的改动会随目录一起删除。
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 directory, confirm and inform the user that uncommitted changes will be retained, but changes in directories to be cleaned will be deleted along with the directories.
git status --short -
If the user has not explicitly requested to perform the cleanup, first explain that this is a destructive operation and obtain confirmation.
-
Preview the cleanup plan first:sh
node .agents/skills/starter-cleaner/scripts/clean.js --dry-run -
Execute after confirming the target isv2. The script will delete the old
wot-starter, then runsrc/pages.jsonin a controlled manner, and exit the dev server after the new minimalpnpm dev:h5is generated:src/pages.jsonshnode .agents/skills/starter-cleaner/scripts/clean.js -
Executeto update the lock file, then run
pnpm install --lockfile-onlyandpnpm type-check. If dependencies are unavailable, at least checkpnpm lintand the diff after cleanup, and clearly inform the user of the unexecuted verifications.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 runs:
- Delete ,
docs/,src/subPages/,src/subEcharts/.src/subAsyncEcharts/ - Delete the old , then trigger
src/pages.jsonto regenerate the minimal page configuration viavite-plugin-uni-pages.pnpm dev:h5 - Delete to restore the project from a document workspace to a single-package project.
pnpm-workspace.yaml - Remove the three example sub-package entries from the configuration in
UniHelperPages.vite.config.ts - Remove and
docs:*scripts fromlint:docs.package.json - Retain ,
uni-echartsdependencies and related Vite configurations to facilitate continued use of charts in business.echarts
安全约束
Security Constraints
- 不直接拼接或扩展删除路径;仅使用脚本内的固定清单。
- 不在非 v2 项目中运行。仅在用户明确确认目标项目后使用
wot-starter跳过项目身份检查。--force - 不用 绕过未提交改动提示;该参数只用于项目身份检查。
--force
- Do not directly concatenate or extend deletion paths; only use fixed lists within the script.
- Do not run in non-v2 projects. Only use
wot-starterto skip project identity check after the user explicitly confirms the target project.--force - Do not use to bypass the uncommitted changes prompt; this parameter is only used for project identity check.
--force