all repos — site @ 08e4585f71a83e447d2a54d2c1e994184bc15a6e

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