From 9d17acbe2b11cb1e177b3187f8c28dbe2d5d184d Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 16 May 2026 18:05:15 +0200 Subject: [PATCH] fix(13-05): catalog air config watches css and rebuilds tailwind on change --- backend/.air-catalog.toml | 11 +++++++++++ backend/justfile | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 backend/.air-catalog.toml diff --git a/backend/.air-catalog.toml b/backend/.air-catalog.toml new file mode 100644 index 0000000..cfce2ad --- /dev/null +++ b/backend/.air-catalog.toml @@ -0,0 +1,11 @@ +root = "." +tmp_dir = "tmp" + +[build] +cmd = "templ generate && ./bin/tailwindcss -i tailwind.input.css -o static/tailwind.css && go build -tags catalog -o ./tmp/web ./cmd/web" +bin = "./tmp/web" +include_ext = ["go", "templ", "css"] +exclude_dir = ["tmp", "bin", "static", ".git", "internal/db/sqlc"] +exclude_regex = [".*_templ\\.go$"] +delay = 200 +stop_on_error = true diff --git a/backend/justfile b/backend/justfile index 7d90d25..1324237 100644 --- a/backend/justfile +++ b/backend/justfile @@ -138,9 +138,9 @@ worker: db-up go run ./cmd/worker # Run the component catalog with live-reload on localhost:8080/ui-catalog (dev-only). +# Watches .go, .templ, and .css — rebuilds Tailwind + Go on any change. # Visit http://localhost:8080/ui-catalog to review all 11 component sections. catalog: - just generate DATABASE_URL='{{ database_url }}' \ S3_ENDPOINT='{{ s3_endpoint }}' \ S3_BUCKET='{{ s3_bucket }}' \ @@ -148,7 +148,7 @@ catalog: S3_ACCESS_KEY='{{ s3_access_key }}' \ S3_SECRET_KEY='{{ s3_secret_key }}' \ S3_USE_PATH_STYLE='{{ s3_use_path_style }}' \ - air -c .air.toml --build.cmd "templ generate && go build -tags catalog -o ./tmp/web ./cmd/web" + air -c .air-catalog.toml test: just generate