Miško Hevery 87d824e1b4 fix: add typescript test for our typings (#9096)
* Revert "fix(d.ts): enable angular2 compilation with TS flag --strictNullChecks (#8902)"

This reverts commit 7e352a27f7172a80cfc5aefa6296ebbaca8df450.

* test: add typescript test for our typings
2016-06-08 16:06:23 -07:00

25 lines
776 B
Bash
Executable File

#!/usr/bin/env bash
set -ex -o pipefail
# These ones can be `npm link`ed for fast development
LINKABLE_PKGS=(
$(pwd)/dist/packages-dist/{common,core,compiler,compiler-cli,http,router,router-deprecated,upgrade,platform-{browser,browser-dynamic,server}}
)
TMPDIR=${TMPDIR:-/tmp/angular-build/}
readonly TMP=$TMPDIR/typings-test.$(date +%s)
mkdir -p $TMP
cp -R -v tools/typings-test/* $TMP
# run in subshell to avoid polluting cwd
(
cd $TMP
# create package.json so that npm install doesn't pollute any parent node_modules's directory
npm init --yes
npm install ${LINKABLE_PKGS[*]}
npm install @types/es6-promise @types/es6-collections @types/jasmine rxjs@5.0.0-beta.6
npm install typescript@1.8.10
$(npm bin)/tsc --version
$(npm bin)/tsc -p tsconfig.json
)