forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·29 lines (27 loc) · 876 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -e -o pipefail
if [ $# -eq 0 ]
then
echo "Angular test runner. (No platform specified)"
echo
echo "./test.sh [node|browser|browserNoRouter|router|tools]"
echo
else
cd `dirname $0`
rm -rf dist/tools
if [ -z ${NODE_PATH+x} ]; then
export NODE_PATH=$(pwd)/dist/all:$(pwd)/dist/tools
else
export NODE_PATH=$NODE_PATH:$(pwd)/dist/all/:$(pwd)/dist/tools/
fi
echo "Compiling tools..."
$(npm bin)/tsc -p tools
$(npm bin)/tsc -p packages/tsc-wrapped
if [[ $1 == 'node' ]]; then
# Note: .metadata.json files are needed for the language service tests!
echo "Creating .metadata.json files..."
node --max-old-space-size=3000 dist/all/@angular/tsc-wrapped/src/main -p packages
node --max-old-space-size=3000 dist/all/@angular/tsc-wrapped/src/main -p modules
fi
node dist/tools/tsc-watch/ $1 watch
fi