From 73ebc50069d5e8258d6839ae1907bd59b1d2be6f Mon Sep 17 00:00:00 2001 From: Tetardtek Date: Sat, 21 Mar 2026 20:27:30 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20setup.sh=20=E2=80=94=20build=20brain-ui?= =?UTF-8?q?=20avec=20npm=20directement=20(plus=20de=20build.sh)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index e2ea17b..4639a74 100755 --- a/setup.sh +++ b/setup.sh @@ -66,15 +66,21 @@ echo " Ils fonctionnent sans Git. Pour les versionner : docs/satellites.md" # 3. Build dashboard echo "" echo "=== Dashboard ===" -if [ -d "$BRAIN_ROOT/brain-ui/dist" ]; then - echo "✅ brain-ui deja build" -else - if command -v node &>/dev/null && command -v npm &>/dev/null; then - bash "$BRAIN_ROOT/brain-ui/build.sh" +if [ -d "$BRAIN_ROOT/brain-ui" ]; then + if [ -d "$BRAIN_ROOT/brain-ui/dist" ]; then + echo "✅ brain-ui deja build" else - echo "⚠️ Node.js/npm absent — le dashboard ne sera pas disponible." - echo " Installe Node.js 18+ puis relance : bash brain-ui/build.sh" + if command -v node &>/dev/null && command -v npm &>/dev/null; then + echo "→ Build brain-ui..." + cd "$BRAIN_ROOT/brain-ui" && npm install --silent && npm run build && cd "$BRAIN_ROOT" + echo "✅ brain-ui build" + else + echo "⚠️ Node.js/npm absent — le dashboard ne sera pas disponible." + echo " Installe Node.js 18+ puis relance setup.sh" + fi fi +else + echo "⚠️ brain-ui/ absent — dashboard non disponible." fi # 3. Init brain-engine