Works now

This commit is contained in:
Jordan Roher 2023-12-14 15:02:25 -08:00
parent 42bd97b03e
commit 00e056cdd4
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,7 @@
"build": "tsc && vite build", "build": "tsc && vite build",
"serve": "vite preview", "serve": "vite preview",
"start": "node start.js", "start": "node start.js",
"stop": "pkill -f node", "stop": "pkill -f 'vite preview'",
"html": "html-minifier --remove-comments --collapse-whitespace --input-dir ./dist --output-dir ./dist --file-ext html", "html": "html-minifier --remove-comments --collapse-whitespace --input-dir ./dist --output-dir ./dist --file-ext html",
"replace": "npm run replace:script", "replace": "npm run replace:script",
"replace:script": "replace-in-file --configFile replace-script.cjs" "replace:script": "replace-in-file --configFile replace-script.cjs"

View File

@ -48,7 +48,11 @@ async function runCommands() {
await renderHomePage(); await renderHomePage();
await runNpmCommand("run html"); await runNpmCommand("run html");
await runNpmCommand("run replace"); await runNpmCommand("run replace");
await runNpmCommand("run stop"); try {
await runNpmCommand("run stop");
} catch {
// It's fine
}
}, 2000); }, 2000);
console.log("Starting web server"); console.log("Starting web server");