chore(scripts): clean up setup; add start + update

This commit is contained in:
Cory Dransfeldt 2025-06-20 17:31:11 -07:00
parent 555d611c2a
commit 4bc85bde57
No known key found for this signature in database
10 changed files with 103 additions and 63 deletions

25
scripts/start.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
set -eu
tmpfile=$(mktemp)
cleanup() {
echo -e "\n👋 Exiting. Cya!"
}
trap cleanup SIGINT SIGTERM
echo "🧼 Cleaning project..."
npm run clean --silent
echo "🛠️ Building project..."
npm run build --silent
echo "🚀 Starting development server..."
echo
npx concurrently -k -n 11ty,PHP \
"eleventy --watch" \
"bash -c 'set -a; source .env; set +a; php -d error_reporting=E_ALL^E_DEPRECATED -S localhost:8080 -t dist'" \
2>&1 | tee "$tmpfile" | grep --line-buffered -Ev '(exited with code|Sending SIGTERM)' || true