1 | #!/usr/bin/env bash
|
2 |
|
3 | if [ -d "./node_modules/@bxjs/base" ]; then
|
4 |
|
5 | source ./node_modules/@bxjs/base/cmd.sh
|
6 | else
|
7 | echo "只允许在应用工程代码中执行本地调试脚本"
|
8 | exit
|
9 | fi
|
10 |
|
11 |
|
12 | cmd_stop
|
13 | if [ "$1" == "x" ]; then
|
14 | exit 0;
|
15 | fi
|
16 |
|
17 | find ./app -name '*.js' -type f -print -exec rm -rf {} \;
|
18 | rm -rf .tscache
|
19 |
|
20 | echo "import '@bxjs/base/framework/test'" > ./test.ts
|
21 | ./node_modules/nodemon/bin/nodemon.js --exec "./node_modules/ts-node/dist/bin.js --cache-directory .tscache --project ./tsconfig.json" ./test.ts $1 --ignore dist/ --ignore test/ --ignore resources/ &
|