Name each embedded static file so a missing Alpine.js fails the build (closes #166)
check / check (push) Successful in 3m16s

static/static.go embedded the css and js directories, which match
whatever is present, so a build that skipped make assets produced a
binary whose pages had no Alpine.js. It now names the four files the
pages load, so a missing one is a compile error naming it.
css/input.css, the Tailwind source that no page loads, is no longer
embedded or served.

Both lint stages now extract Alpine.js before linting, since the
static package no longer compiles without it.

Model: opus-5-5
This commit is contained in:
2026-10-02 17:23:02 +00:00
parent 290925f184
commit d9480e0df5
4 changed files with 13 additions and 3 deletions
+5 -2
View File
@@ -5,7 +5,10 @@ import (
"embed"
)
// Static holds the embedded CSS and JavaScript files for the web UI.
// Static holds the CSS and JavaScript files the web UI's pages load. They
// are named one by one so that a missing js/alpine.min.js, which make
// assets extracts and git does not track, fails the build instead of
// leaving the pages without Alpine.js.
//
//go:embed css js
//go:embed css/tailwind.css css/style.css js/app.js js/alpine.min.js
var Static embed.FS