fix: clean command on windows

This commit is contained in:
chareice 2023-09-04 10:36:24 +08:00
parent eb255df35e
commit ffe443b4e9

View File

@ -10,12 +10,11 @@ module.exports = (cli) => {
cli
.command('clean')
.allowUnknownOption()
.action(() => {
.action(async () => {
if (!isDev()) {
return;
}
run('rimraf', ['-rf', './storage/app-dev']);
run('rimraf', ['-rf', './**/{.umi,.umi-production}']);
run('rimraf', ['-rf', 'packages/*/*/{lib,esm,es,dist,node_modules}']);
await run('rimraf', ['-rf', './storage/app-dev']);
await run('rimraf', ['-rf', 'packages/*/*/{lib,esm,es,dist,node_modules}']);
});
};