feat(cli): optimzie clean

This commit is contained in:
陈嘉涵
2019-11-29 10:01:25 +08:00
parent cc26929ebc
commit a0fd87a0d1
2 changed files with 28 additions and 9 deletions
+7 -5
View File
@@ -1,8 +1,10 @@
import { emptyDirSync } from 'fs-extra';
import { emptyDir } from 'fs-extra';
import { ES_DIR, LIB_DIR, DIST_DIR } from '../common/constant';
export function clean() {
emptyDirSync(ES_DIR);
emptyDirSync(LIB_DIR);
emptyDirSync(DIST_DIR);
export async function clean() {
await Promise.all([
emptyDir(ES_DIR),
emptyDir(LIB_DIR),
emptyDir(DIST_DIR)
]);
}