Updates
This commit is contained in:
Vendored
+4
-4
@@ -3,18 +3,18 @@ import startServer from "../../functions/server/start-server";
|
||||
import { log } from "../../utils/log";
|
||||
import bunextInit from "../../functions/bunext-init";
|
||||
import rewritePagesModule from "../../utils/rewrite-pages-module";
|
||||
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("dev")
|
||||
.description("Run development server")
|
||||
.action(async () => {
|
||||
process.env.NODE_ENV == "development";
|
||||
process.env.NODE_ENV = "development";
|
||||
log.info("Running development server ...");
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user