Add and use a simpler run script
This commit is contained in:
@@ -1,32 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# XXX should we default to strict or non-strict here?
|
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
run_dir="$DIR"
|
cd "$DIR"
|
||||||
|
|
||||||
source "$run_dir"/../framework/shims/common
|
exec ../cmd node dist/index.js
|
||||||
source "$run_dir"/../framework/shims/node.common
|
|
||||||
|
|
||||||
strict_arg="${1:---no-strict}"
|
|
||||||
|
|
||||||
if [[ "$strict_arg" = "--strict" ]] ; then
|
|
||||||
strict="yes"
|
|
||||||
else
|
|
||||||
strict="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmd="tsx"
|
|
||||||
if [[ "strict" = "yes" ]] ; then
|
|
||||||
cmd="ts-node"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$run_dir"
|
|
||||||
|
|
||||||
"$run_dir"/check.sh
|
|
||||||
#echo checked
|
|
||||||
# $ROOT/cmd "$cmd" $run_dir/app.ts
|
|
||||||
../cmd node "$run_dir"/out/app.js
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ func runExpress(changes <-chan FileChange) {
|
|||||||
|
|
||||||
// Helper to start the express process
|
// Helper to start the express process
|
||||||
startExpress := func() *exec.Cmd {
|
startExpress := func() *exec.Cmd {
|
||||||
cmd := exec.Command("node", "../express/dist/index.js")
|
cmd := exec.Command("../express/run.sh")
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user