#!/usr/bin/env bash set -euo pipefail export IS_DEV_SERVER=1 # Killing watchexec ourselves, it may not be done otherwise. function finish { if [ -n "${LIVE_SERVER_PID:-}" ]; then kill "$LIVE_SERVER_PID" > /dev/null 2>&1 fi } trap finish EXIT watchexec \ --clear \ --watch ts \ --watch html \ --watch images \ --watch styles \ --debounce 100ms \ -- make & LIVE_SERVER_PID="$!" while true; do sleep 1; done