generated from template/vite-react-template
Initial commit
This commit is contained in:
15
script/index.ts
Normal file
15
script/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { program, Command } from './program';
|
||||
|
||||
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);
|
||||
2
script/program.ts
Normal file
2
script/program.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import { program, Command } from 'commander';
|
||||
export { program, Command };
|
||||
Reference in New Issue
Block a user