#!/bin/bash # Network Scanner Frontend Build Script echo "╔══════════════════════════════════════════════════════════════════════════════╗" echo "║ Network Scanner Frontend - Production Build ║" echo "╚══════════════════════════════════════════════════════════════════════════════╝" echo "" # Check if node_modules exists if [ ! -d "node_modules" ]; then echo "❌ Dependencies not installed. Running setup..." ./setup.sh if [ $? -ne 0 ]; then exit 1 fi fi echo "🔨 Building production bundle..." npm run build if [ $? -ne 0 ]; then echo "❌ Build failed" exit 1 fi echo "" echo "✅ Build complete!" echo "" echo "Output directory: dist/" echo "" echo "To preview the production build:" echo " npm run preview" echo "" echo "To deploy, copy the dist/ directory to your web server." echo ""