#!/bin/bash # Dev helper: run both vite + quick test set -e cd "$(dirname "$0")/../webapp" echo "Checking vite build..." npm run build echo "Build ok -> dist/" echo "" echo "Preview static build on http://localhost:4173 to test without HMR" npm run preview -- --host 0.0.0.0 --port 4173 & PREVIEW_PID=$! echo "Preview PID $PREVIEW_PID" sleep 2 echo "" echo "Try kiosk with prod file:" echo "cage -s -- cog --platform=wl file://$PWD/dist/index.html --bg-color=#2E3440" echo "" echo "Press Ctrl+C to stop preview" wait $PREVIEW_PID