chore: 初始化提交
This commit is contained in:
commit
943c0a0e5a
71 files changed
+7122
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { cpSync, existsSync, rmSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const source = path.resolve(here, "../../web/dist");
|
||||
const target = path.resolve(here, "../dist");
|
||||
|
||||
if (!existsSync(source)) {
|
||||
console.error("未找到 web/dist,请先在 web/ 目录执行 pnpm build");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
rmSync(target, { recursive: true, force: true });
|
||||
cpSync(source, target, { recursive: true });
|
||||
console.log(`已复制前端产物:${source} -> ${target}`);
|
||||
Reference in new issue
Block a user