This commit is contained in:
2026-03-23 07:42:00 +01:00
parent 567fb4f746
commit 4b8b610e32
43 changed files with 635 additions and 169 deletions
+5 -6
View File
@@ -1,11 +1,10 @@
import { Command } from "commander";
import allPagesBundler from "../../functions/bundler/all-pages-bundler";
import { log } from "../../utils/log";
import init from "../../functions/init";
import rewritePagesModule from "../../utils/rewrite-pages-module";
import allPagesBunBundler from "../../functions/bundler/all-pages-bun-bundler";
import { execSync } from "child_process";
import grabDirNames from "../../utils/grab-dir-names";
import { rmSync } from "fs";
const { HYDRATION_DST_DIR, BUNX_CWD_PAGES_REWRITE_DIR } = grabDirNames();
export default function () {
return new Command("build")
@@ -14,15 +13,15 @@ export default function () {
process.env.NODE_ENV = "production";
process.env.BUILD = "true";
try {
execSync(`rm -rf ${HYDRATION_DST_DIR}`);
execSync(`rm -rf ${BUNX_CWD_PAGES_REWRITE_DIR}`);
rmSync(HYDRATION_DST_DIR, { recursive: true });
rmSync(BUNX_CWD_PAGES_REWRITE_DIR, { recursive: true });
}
catch (error) { }
await rewritePagesModule();
await init();
log.banner();
log.build("Building Project ...");
// await allPagesBunBundler();
allPagesBundler();
await allPagesBunBundler();
// await allPagesBundler();
});
}