Use the deterministic script provided with the skill to clean up wot-starter v2, retaining the basic pages, Wot UI,uni-echarts , and echarts capabilities.
Execution flow
-
Run
git status --shortin the project root directory, confirm and inform the user that uncommitted changes will be preserved, but changes in directories to be cleaned will be deleted along with the directories. -
If the user has not yet explicitly requested execution of the cleanup, first explain that this is a destructive operation and obtain confirmation.
-
First preview the cleanup plan:
node .agents/skills/starter-cleaner/scripts/clean.js --dry-run -
Confirm the target is
wot-starterv2 before executing. The script will delete the oldsrc/pages.json, then runpnpm dev:h5in a controlled manner, and exit the dev server after the new minimalsrc/pages.jsonis generated:node .agents/skills/starter-cleaner/scripts/clean.js
- Run
pnpm install --lockfile-onlyto update the lockfile, then runpnpm type-checkandpnpm lint. If dependencies are unavailable, at least checkgit diff --checkand the diff after cleanup, and clearly inform the user of the validations that were not run.
Cleanup scope
The script performs the following operations and supports repeated execution:
- Delete
docs/、src/subPages/、src/subEcharts/、src/subAsyncEcharts/。 - Delete the old
src/pages.json, then triggerpnpm dev:h5viavite-plugin-uni-pagesto regenerate the minimal page configuration. - Delete
pnpm-workspace.yaml, restoring the project from a docs workspace to a single-package project. - From
vite.config.ts'sUniHelperPagesconfiguration, remove the above three example subpackage entries. - From
package.json, remove thedocs:*andlint:docsscripts. - Retain the
uni-echarts、echartsdependency and related Vite configuration, so that the business can continue to use charts.
Safety constraints
- Do not directly concatenate or extend deletion paths; only use the fixed list within the script.
- Do not run in non-
wot-starterv2 projects. Only use--forceto skip the project identity check after the user has explicitly confirmed the target project. - Do not use
--forceto bypass the uncommitted changes prompt; that parameter is only used for the project identity check.