kin: KIN-122-backend_dev

This commit is contained in:
Gros Frumos 2026-03-19 21:53:31 +02:00
parent 3a4d6ef79d
commit ab18383bf4
2 changed files with 95 additions and 0 deletions

View file

@ -15,6 +15,15 @@ FRONTEND_DIR="$PROJECT_ROOT/web/frontend"
echo "[rebuild-frontend] Building frontend in $FRONTEND_DIR ..."
cd "$FRONTEND_DIR"
# KIN-122: auto npm install if package.json is newer than node_modules (or node_modules missing).
# This handles the case where agents add new imports/dependencies to package.json.
if [ ! -d "node_modules" ] || [ "package.json" -nt "node_modules" ]; then
echo "[rebuild-frontend] package.json changed or node_modules missing — running npm install ..."
npm install
echo "[rebuild-frontend] npm install complete."
fi
npm run build
echo "[rebuild-frontend] Build complete."