feat: add supervisor prototype with embedded frontend
This commit is contained in:
16
scripts/build-frontend.sh
Executable file
16
scripts/build-frontend.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
WEB_DIR="$ROOT_DIR/web"
|
||||
EMBED_DIST_DIR="$ROOT_DIR/internal/static/dist"
|
||||
|
||||
cd "$WEB_DIR"
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
rm -rf "$EMBED_DIST_DIR"
|
||||
mkdir -p "$EMBED_DIST_DIR"
|
||||
cp -R "$WEB_DIR/dist/." "$EMBED_DIST_DIR/"
|
||||
|
||||
echo "Frontend built into $WEB_DIR/dist and copied to $EMBED_DIST_DIR"
|
||||
Reference in New Issue
Block a user