1
2
3
4
5
6
7
8
9
10
11
12
13
| #!/usr/bin/env bash
| set -euo pipefail
| source "$(dirname "$0")/lib.sh"
|
| if [[ ! -d "$ROOT/frontend/node_modules" ]]; then
| echo "未找到 frontend/node_modules,请先执行:cd frontend && npm install"
| exit 1
| fi
|
| echo "构建前端 (production)…"
| cd "$ROOT/frontend"
| npm run build >>"$LOG_DIR/frontend-build.log" 2>&1
| echo "完成 → $ROOT/frontend/dist(日志 $LOG_DIR/frontend-build.log)"
|
|