feat: SEO field elements and bundle

This commit is contained in:
2026-10-27 10:53:59 +01:00
parent ab8905c429
commit deebd9aa65
15 changed files with 3871 additions and 0 deletions

26
scripts/check-dist.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Drift gate for the committed SEO element bundle. Rebuilds the elements
# from the committed lockfile into a temporary directory and fails when the
# result differs from assets/dist, the files field_types.go embeds. After
# changing assets/src, rebuild with `npm run build` and commit assets/dist.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
if [[ ! -d node_modules ]]; then
npm ci --ignore-scripts
fi
npm run typecheck
TMP="$(mktemp -d)"
trap 'rm -rf "$TMP"' EXIT
node_modules/.bin/vite build --outDir "$TMP/dist" --emptyOutDir --logLevel warn
if ! diff -r "$TMP/dist" assets/dist; then
echo "check-dist: assets/dist is stale; run npm run build and commit assets/dist" >&2
exit 1
fi
echo "check-dist: assets/dist matches a fresh build"