From 6e64cfb3ed5b76109bbca039c176a8ef3da5420d Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 16 May 2026 19:25:55 +0200 Subject: [PATCH] chore(dev): watch CSS files in air and include Tailwind in rebuild cmd Add css to air's include_ext so edits to internal/web/ui/*.css trigger a rebuild. Add Tailwind build step to the air cmd so static/tailwind.css is always up to date on reload. static/ remains excluded so the generated output file doesn't cause a loop. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- backend/.air.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/.air.toml b/backend/.air.toml index 5bf7a4f..8aaec7e 100644 --- a/backend/.air.toml +++ b/backend/.air.toml @@ -2,9 +2,9 @@ root = "." tmp_dir = "tmp" [build] -cmd = "templ generate && go build -o ./tmp/web ./cmd/web" +cmd = "templ generate && ./bin/tailwindcss -i tailwind.input.css -o static/tailwind.css && go build -o ./tmp/web ./cmd/web" bin = "./tmp/web" -include_ext = ["go", "templ"] +include_ext = ["go", "templ", "css"] exclude_dir = ["tmp", "bin", "static", ".git", "internal/db/sqlc"] exclude_regex = [".*_templ\\.go$"] delay = 200