all repos — site @ a0c1362014ac7559b67e3c7a5761c49c7b30ec71

source for my site, found at icyphox.sh

bin/serve.sh (view raw)

 1#!/usr/bin/env bash
 2
 3vite="$1"
 4if [ -z "$vite" ]; then
 5    vite="vite"
 6fi
 7
 8echo "using vite command: $vite"
 9
10kill_vite() {
11    trap SIGINT
12    echo "cleaning up..."
13    pkill vite
14    exit
15}
16trap "kill_vite" INT
17
18"$vite" serve &
19find pages/ static/ templates/ | entr "$vite" build
20
21trap SIGINT