25 lines
548 B
Bash
Executable file
25 lines
548 B
Bash
Executable file
#!/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
|