#!/bin/bash set -e # Define root and web directories REPO_ROOT=$(git rev-parse --show-toplevel) WEB_DIR="$REPO_ROOT/apps/web" echo "📍 Frontend Build Test" echo "📂 Web Directory: $WEB_DIR" cd "$WEB_DIR" # Ensure we are in a clean state or at least dependencies are there if [ ! -d "node_modules" ]; then echo "📦 Installing dependencies..." npm ci else echo "✅ Dependencies found (skipping full install for speed, use clean env for strictness)" # For a purely strict test we might want npm ci always, but for local dev speed: # npm ci fi echo "🔨 Building project..." npm run build echo "✅ Build successful"