浏览代码

Remove existing build directory before building.

Lee Morgan 2 周之前
父节点
当前提交
e5a51f595e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      index.js

+ 1 - 0
index.js

@@ -6,6 +6,7 @@ import parseDir from "./parseDir2.js";
 export default async (express, options = {})=> {
     console.time("Build Completed In");
 
+    await fs.rm(path.join(process.cwd(), ".build/"), {recursive: true, force: true});
     const app = express();
     const root = path.join(process.cwd(), "routes");
     readFiles(root, root, app);