generated from template/vite-react-template
add temp ticket
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { program } from 'commander';
|
||||
|
||||
export const root = process.cwd();
|
||||
|
||||
@@ -9,3 +10,11 @@ export const clearWorkspace = () => {
|
||||
fs.rmSync(path.join(root, file), { recursive: true, force: true });
|
||||
}
|
||||
};
|
||||
|
||||
// clearWorkspace();
|
||||
program.option('-c, --clear', 'clear workspace').action((opts) => {
|
||||
if (opts.clear) {
|
||||
clearWorkspace();
|
||||
}
|
||||
});
|
||||
program.parse(process.argv);
|
||||
|
||||
Reference in New Issue
Block a user