diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/client.sh | 4 | ||||
-rwxr-xr-x | scripts/test.sh | 12 | ||||
-rwxr-xr-x | scripts/travis.sh | 23 |
3 files changed, 30 insertions, 9 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 65b67edcf..3a1532daf 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/usr/bin/env sh | 1 | #!/bin/bash |
2 | 2 | ||
3 | cd client || exit -1 | 3 | cd client || exit -1 |
4 | 4 | ||
5 | rm -rf ./compiled | 5 | rm -rf ./compiled ./dist |
6 | 6 | ||
7 | npm run webpack -- --config config/webpack.prod.js --progress --profile --bail | 7 | npm run webpack -- --config config/webpack.prod.js --progress --profile --bail |
diff --git a/scripts/test.sh b/scripts/test.sh index dc1baf97d..473445876 100755 --- a/scripts/test.sh +++ b/scripts/test.sh | |||
@@ -1,10 +1,8 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | npm run build:server | 3 | npm run build:server || exit -1 |
4 | 4 | ||
5 | cd client || exit -1 | 5 | npm run travis -- client || exit -1 |
6 | npm test || exit -1 | 6 | npm run travis -- api || exit -1 |
7 | 7 | npm run travis -- cli || exit -1 | |
8 | cd .. || exit -1 | 8 | npm run travis -- lint || exit -1 |
9 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 | ||
10 | mocha --exit --require ts-node/register --bail server/tests/index.ts | ||
diff --git a/scripts/travis.sh b/scripts/travis.sh new file mode 100755 index 000000000..e919f18a4 --- /dev/null +++ b/scripts/travis.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ $# -eq 0 ]; then | ||
4 | echo "Need test suite argument." | ||
5 | exit -1 | ||
6 | fi | ||
7 | |||
8 | if [ "$1" = "build_then_client" ]; then | ||
9 | npm run build | ||
10 | mocha --exit --require ts-node/register --bail server/tests/client.ts | ||
11 | elif [ "$1" = "client" ]; then | ||
12 | mocha --exit --require ts-node/register --bail server/tests/client.ts | ||
13 | elif [ "$1" = "api" ]; then | ||
14 | mocha --exit --require ts-node/register --bail server/tests/api/index.ts | ||
15 | elif [ "$1" = "cli" ]; then | ||
16 | mocha --exit --require ts-node/register --bail server/tests/cli/index.ts | ||
17 | elif [ "$1" = "lint" ]; then | ||
18 | cd client || exit -1 | ||
19 | npm run lint || exit -1 | ||
20 | |||
21 | cd .. || exit -1 | ||
22 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 | ||
23 | fi | ||