chore(scripts): clean up setup; add start + update
This commit is contained in:
parent
555d611c2a
commit
4bc85bde57
10 changed files with 103 additions and 63 deletions
25
scripts/start.sh
Executable file
25
scripts/start.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue