#!/usr/bin/env bash
set -e

APPS=(
  "campaign-dashboard"
  "performance-overview"
  "keyword-analyzer"
  "budget-optimizer"
  "search-terms"
  "campaign-detail"
  "recommendations"
)

echo "Building ${#APPS[@]} Google Ads MCP apps..."

for app in "${APPS[@]}"; do
  echo "  → Building $app..."
  npx vite build --config "src/apps/$app/vite.config.ts"
done

echo "✅ All apps built successfully!"
