This commit is contained in:
Corey Johnson 2025-07-11 16:17:43 -07:00
parent 98d8b9ef5a
commit 90f6fb7c51
2 changed files with 4 additions and 2 deletions

View File

@ -6,14 +6,14 @@ console.log(`Bun Version: ${Bun.version}`)
console.log("----------------------------------\n\n")
const run = async (cmd: string[]) => {
const commandText = cmd.join(" ")
const proc = spawn(cmd, {
const proc = spawn(cmd.filter(Boolean), {
stdout: "inherit",
stderr: "inherit",
})
const status = await proc.exited
const commandText = cmd.join(" ")
if (status !== 0) {
throw new Error(`Process "${commandText}" failed with exit code ${status}`)
} else {

View File

@ -31,6 +31,8 @@ export const buildRoute = async ({ distDir, routeName, filepath, force = false }
}
}
// In production I want to limit the number of times we build routes, so I only build it if it doesn't exist or if the cache is not set
// The cache is so that when we deploy it will always rebuild the routes.
const needsBuild = async (routeName: string, distDir: string) => {
if (process.env.NODE_ENV !== "production") {
return true