bin/serve: specify vite command
Anirudh Oppiliappan x@icyphox.sh
Mon, 27 May 2024 21:58:13 +0300
1 files changed,
9 insertions(+),
2 deletions(-)
jump to
M
bin/serve.sh
→
bin/serve.sh
@@ -1,5 +1,12 @@
#!/usr/bin/env bash +vite="$1" +if [ -z "$vite" ]; then + vite="vite" +fi + +echo "using vite command: $vite" + kill_vite() { trap SIGINT echo "cleaning up..."@@ -8,7 +15,7 @@ exit
} trap "kill_vite" INT -vite serve & -find pages/ static/ templates/ | entr vite build +"$vite" serve & +find pages/ static/ templates/ | entr "$vite" build trap SIGINT