diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/run | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,7 +1,15 @@ #!/bin/bash -e ## tools/run [ARGS...] -## -## Run the server in development mode. Shorthand for `cargo run`. -cargo run -- "$@" +if [ -z ${HI_DEV+x} ]; then + tools/build-ui + cargo run -- "$@" +else + npm run dev & PIDS[0]=$! + cargo run -- "$@" & PIDS[1]=$! + + trap "kill ${PIDS[*]}" SIGINT + + wait +fi |
