This commit is contained in:
Michael committed 2026-08-06 19:00:08 +12:00
1 parent f7037a6780
commit acb5070622
44 files changed
+5047

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Builds the Svelte SPA and copies it into the Go binary's embed directory.
# The Dockerfile does the equivalent as part of the image build; use this
# script when building/running the Go binary directly on your machine.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
echo "==> Installing frontend dependencies"
(cd frontend && npm install)
echo "==> Building frontend"
(cd frontend && npm run build)
echo "==> Copying build into backend/cmd/server/web"
mkdir -p backend/cmd/server/web
find backend/cmd/server/web -mindepth 1 ! -name '.gitkeep' -delete
cp -r frontend/dist/. backend/cmd/server/web/
echo "==> Done. You can now: cd backend && go build ./cmd/server"