#!/usr/bin/env bash
# Build the Tailwind CSS file for ModuleDesk.
# Re-run this script after adding new Tailwind utility classes to templates or app.js.
# The built file (tailwind.css) is committed to the repo so production needs no build step.

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"

cd "$PROJECT_ROOT"

bin/tailwindcss \
  -c tailwind.config.js \
  -i supporthub/app/static/src/tailwind.css \
  -o supporthub/app/static/tailwind.css \
  --minify

echo "Built: supporthub/app/static/tailwind.css ($(wc -c < supporthub/app/static/tailwind.css) bytes)"
