diff options
author | Joris | 2023-02-07 18:38:44 +0100 |
---|---|---|
committer | Joris | 2023-02-07 18:38:44 +0100 |
commit | d0431c7f81e20dfb77a6fe154292d6b06f433984 (patch) | |
tree | 51689a11757be4eeb7f131e6dd78f4f71f4c006f /bin | |
parent | 76268b9f5a1b7fcb43c614387ee78106abfc6fb2 (diff) |
Init version
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dev-server | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/dev-server b/bin/dev-server new file mode 100755 index 0000000..82655d1 --- /dev/null +++ b/bin/dev-server @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Run server + +python -m http.server --directory public 8000 & +trap "fuser -k 8000/tcp" EXIT + +# Watch TypeScript + +CHECK="echo Checking TypeScript… && tsc --checkJs" +BUILD="esbuild --bundle src/example.ts --target=es2017 --outdir=public" +watchexec \ + --clear \ + --watch src \ + -- "$CHECK && $BUILD" |