all repos — site @ a3252db9fa2c46d985ee6b7bf66d86bed0f5871a

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 --drafts
20
21trap SIGINT