diff --git a/script/develop b/script/develop index fb17368..bfc2e9b 100755 --- a/script/develop +++ b/script/develop @@ -1,6 +1,10 @@ # Stop on errors set -e +if [ -z "$PORT" ]; then + PORT=5001 +fi + cd "$(dirname "$0")/.." rm -rf dist @@ -11,6 +15,6 @@ trap "kill 0" EXIT # Run tsc once as rollup expects those files npm exec -- tsc || true -npm exec -- serve -p 5001 & +npm exec -- serve -p "$PORT" & npm exec -- tsc --watch & npm exec -- rollup -c --watch