2016-05-27 19:22:16 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex -o pipefail
|
|
|
|
|
|
|
|
# These ones can be `npm link`ed for fast development
|
|
|
|
LINKABLE_PKGS=(
|
2016-07-18 06:50:31 -04:00
|
|
|
$(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic}
|
2016-05-27 19:22:16 -04:00
|
|
|
$(pwd)/dist/tools/@angular/tsc-wrapped
|
|
|
|
)
|
|
|
|
PKGS=(
|
2016-09-02 18:42:22 -04:00
|
|
|
reflect-metadata@0.1.8
|
|
|
|
typescript@2.0.2
|
2016-09-10 12:16:03 -04:00
|
|
|
zone.js@0.6.21
|
2016-09-02 18:42:22 -04:00
|
|
|
rxjs@5.0.0-beta.11
|
|
|
|
@types/{node@6.0.38,jasmine@2.2.33}
|
|
|
|
jasmine@2.4.1
|
2016-08-30 21:07:40 -04:00
|
|
|
webpack@2.1.0-beta.21
|
2016-09-02 18:42:22 -04:00
|
|
|
@angular2-material/{core,button}@2.0.0-alpha.8-1
|
2016-05-27 19:22:16 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
TMPDIR=${TMPDIR:-.}
|
|
|
|
readonly TMP=$TMPDIR/e2e_test.$(date +%s)
|
|
|
|
mkdir -p $TMP
|
2016-06-02 14:33:53 -04:00
|
|
|
cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP
|
2016-10-06 11:37:37 -04:00
|
|
|
cp -R -v modules/benchmarks $TMP
|
2016-05-27 19:22:16 -04:00
|
|
|
# Try to use the same versions as angular, in particular, this will
|
|
|
|
# cause us to install the same rxjs version.
|
|
|
|
cp -v package.json $TMP
|
|
|
|
|
|
|
|
# run in subshell to avoid polluting cwd
|
|
|
|
(
|
|
|
|
cd $TMP
|
2016-06-14 22:04:24 -04:00
|
|
|
set -ex -o pipefail
|
2016-05-27 19:22:16 -04:00
|
|
|
npm install ${PKGS[*]}
|
|
|
|
# TODO(alexeagle): allow this to be npm link instead
|
|
|
|
npm install ${LINKABLE_PKGS[*]}
|
|
|
|
|
2016-06-23 17:26:54 -04:00
|
|
|
./node_modules/.bin/tsc --version
|
2016-06-02 14:33:53 -04:00
|
|
|
# Compile the compiler-cli integration tests
|
2016-08-13 01:13:54 -04:00
|
|
|
# TODO(vicb): restore the test for .xtb
|
|
|
|
#./node_modules/.bin/ngc --i18nFile=src/messages.fi.xtb --locale=fi --i18nFormat=xtb
|
|
|
|
./node_modules/.bin/ngc --i18nFile=src/messages.fi.xlf --locale=fi --i18nFormat=xlf
|
|
|
|
./node_modules/.bin/ng-xi18n --i18nFormat=xlf
|
|
|
|
./node_modules/.bin/ng-xi18n --i18nFormat=xmb
|
2016-05-27 19:22:16 -04:00
|
|
|
|
|
|
|
./node_modules/.bin/jasmine init
|
2016-06-02 14:33:53 -04:00
|
|
|
# Run compiler-cli integration tests in node
|
2016-08-30 21:07:40 -04:00
|
|
|
./node_modules/.bin/webpack ./webpack.config.js
|
|
|
|
./node_modules/.bin/jasmine ./all_spec.js
|
2016-06-23 17:26:54 -04:00
|
|
|
|
|
|
|
# Compile again with a differently named tsconfig file
|
|
|
|
mv tsconfig.json othername.json
|
|
|
|
./node_modules/.bin/ngc -p othername.json
|
2016-05-27 19:22:16 -04:00
|
|
|
)
|