perf: 优化

This commit is contained in:
2025-04-07 14:11:34 +08:00
parent 0d8e594a26
commit cec2edf2ff
6 changed files with 36 additions and 10 deletions

15
script/cmd.ts Normal file
View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import path from 'path';
import { program, Command } from 'commander';
export const root = process.cwd();
export const clearWorkspace = () => {
const files = ['submodules', 'packages', 'pnpm-workspace.yaml', 'turbo.json'];
for (const file of files) {
fs.rmSync(path.join(root, file), { recursive: true, force: true });
}
};
program.addCommand(new Command('clear').action(clearWorkspace));
program.parse(process.argv);