changes
This commit is contained in:
1 parent
f7037a6780
commit
acb5070622
44 files changed
+5047
No files matched your search
Executable
+20
@@ -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"
|
||||
Reference in new issue
Block a user