Collapse portal under src/, unify pnpm workspace/scripts, thin VIP topic re-exports, drop orphan vip scaffolds and one-shot scripts, ignore xhs/release, document root commands. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
655 B
JavaScript
28 lines
655 B
JavaScript
/**
|
|
* Remove local build artifacts (safe; does not touch source).
|
|
*/
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
const targets = [
|
|
".next",
|
|
"tsconfig.tsbuildinfo",
|
|
"apps/admin/dist",
|
|
"apps/miniprogram/h5/dist",
|
|
"apps/miniprogram/weapp/dist",
|
|
"apps/miniprogram/tt/dist",
|
|
];
|
|
|
|
function rm(p) {
|
|
const full = path.join(root, p);
|
|
if (!fs.existsSync(full)) return;
|
|
fs.rmSync(full, { recursive: true, force: true });
|
|
console.log("removed", p);
|
|
}
|
|
|
|
for (const t of targets) rm(t);
|
|
console.log("clean done");
|