diff options
| author | Kyren223 <contact@kyren.codes> | 2026-10-08 19:44:46 +0300 |
|---|---|---|
| committer | Kyren223 <contact@kyren.codes> | 2026-10-08 19:44:46 +0300 |
| commit | 9b03d2790b8b8db1b5a6755b6130f37e5f7f2455 (patch) | |
| tree | a84f6e9cfe2b8aaf087d55830c938443f6be683e /run.sh | |
| parent | 6e70fe447ec9504757fbdc152b5b3697c9af8def (diff) | |
WIP
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail + +cleanup() { + trap - SIGINT SIGTERM EXIT + kill $(jobs -p) 2>/dev/null || true +} +trap cleanup SIGINT SIGTERM EXIT + +# templ generate --watch --proxy="http://localhost:8080" --cmd="DEV=1 go run ." --watch-pattern='.*' & +templ generate --watch --proxy="http://localhost:8080" --cmd="DEV=1 go run ." --watch-pattern='(.+\.go$)|(.+\.templ$)|(.+_templ\.txt$)|(.+\.css$)|(.+\.js$)|(.+\.md$)|(.+\.svg$)|(.+\.json$)|(.+\.html$)|(.+\.txt$)|(.+\.ttf$)|(.+\.woff2?$)|(.+\.png$)|(.+\.jpg$)|(.+\.webp$)' & +TEMPL_PID=$! + +tail -f /dev/null | tailwindcss -i ./public/main.css -o ./public/style.css --watch & +TAILWIND_PID=$! + +echo "[dev] Watching Templ (PID $TEMPL_PID) and Tailwind (PID $TAILWIND_PID)..." + +wait -n + +echo "[dev] A background process exited unexpectedly." |
