fix: setup.sh — build brain-ui avec npm directement (plus de build.sh)

This commit is contained in:
2026-03-21 20:27:30 +01:00
parent e0087794c8
commit 73ebc50069

View File

@@ -66,15 +66,21 @@ echo " Ils fonctionnent sans Git. Pour les versionner : docs/satellites.md"
# 3. Build dashboard # 3. Build dashboard
echo "" echo ""
echo "=== Dashboard ===" echo "=== Dashboard ==="
if [ -d "$BRAIN_ROOT/brain-ui/dist" ]; then if [ -d "$BRAIN_ROOT/brain-ui" ]; then
if [ -d "$BRAIN_ROOT/brain-ui/dist" ]; then
echo "✅ brain-ui deja build" echo "✅ brain-ui deja build"
else else
if command -v node &>/dev/null && command -v npm &>/dev/null; then if command -v node &>/dev/null && command -v npm &>/dev/null; then
bash "$BRAIN_ROOT/brain-ui/build.sh" echo "→ Build brain-ui..."
cd "$BRAIN_ROOT/brain-ui" && npm install --silent && npm run build && cd "$BRAIN_ROOT"
echo "✅ brain-ui build"
else else
echo "⚠️ Node.js/npm absent — le dashboard ne sera pas disponible." echo "⚠️ Node.js/npm absent — le dashboard ne sera pas disponible."
echo " Installe Node.js 18+ puis relance : bash brain-ui/build.sh" echo " Installe Node.js 18+ puis relance setup.sh"
fi fi
fi
else
echo "⚠️ brain-ui/ absent — dashboard non disponible."
fi fi
# 3. Init brain-engine # 3. Init brain-engine