From 00e056cdd4a8000b2f615dcd96f7463bcf856852 Mon Sep 17 00:00:00 2001 From: Jordan Roher Date: Thu, 14 Dec 2023 15:02:25 -0800 Subject: [PATCH] Works now --- package.json | 2 +- start.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 82806da..d455afa 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "tsc && vite build", "serve": "vite preview", "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", "replace": "npm run replace:script", "replace:script": "replace-in-file --configFile replace-script.cjs" diff --git a/start.js b/start.js index 22674c5..fa6c637 100644 --- a/start.js +++ b/start.js @@ -48,7 +48,11 @@ async function runCommands() { await renderHomePage(); await runNpmCommand("run html"); await runNpmCommand("run replace"); - await runNpmCommand("run stop"); + try { + await runNpmCommand("run stop"); + } catch { + // It's fine + } }, 2000); console.log("Starting web server");