Extract Alpine.js in script/test so the pre-commit hook works

The extraction moves from the Makefile's assets target into
script/assets. script/test runs it before the tests, so make test,
make check, script/check and the pre-commit hook all get the file on a
fresh clone; make assets, make build and make dev call the same script.
The README now says only that nothing downloads Alpine.js.

Model: opus-5-5
This commit is contained in:
2026-10-01 19:42:29 +00:00
committed by sneak
parent ff19b5237d
commit 1a7ffa3b3d
5 changed files with 40 additions and 25 deletions
+3 -6
View File
@@ -27,13 +27,10 @@ bootstrap:
setup:
@script/setup
# Alpine.js is committed as its npm package tarball in 3p/. This extracts
# the browser build from it to where go:embed reads it; the extracted file
# is not committed.
assets:
tar -xzOf 3p/alpinejs-3.14.9.tgz package/dist/cdn.min.js >static/js/alpine.min.js
@script/assets
test: assets
test:
@script/test
lint:
@@ -45,7 +42,7 @@ fmt:
fmt-check:
@script/fmt-check
check: assets
check:
@script/check
build: assets