refactor(compiler_cli): move it into modules/@angular and integrate properly into the build
This also does no more depend on a version on npm for the compiler_cli. Also runs the tests for tools/metadata
This commit is contained in:
@@ -10,7 +10,16 @@ source ./env.sh
|
||||
cd ../..
|
||||
|
||||
$(npm bin)/tsc -p ./tools/tsconfig.json
|
||||
$(npm bin)/ng2tc -p ./modules/tsconfig.json
|
||||
$(npm bin)/tsc -p ./tools/compiler_cli/src/tsconfig.json
|
||||
|
||||
# TODO: Right now we have a cycle in that the compiler_cli depends on Angular
|
||||
# but we need it to compile Angular.
|
||||
# The solution right now is to do 2 compilation runs.
|
||||
# Fix this by separating the metadata extraction into a separate binary that does
|
||||
# not depend on Angular.
|
||||
$(npm bin)/tsc -p ./modules/tsconfig.json
|
||||
node dist/all/@angular/compiler_cli/src/main -p modules/tsconfig.json
|
||||
|
||||
# Compile the compiler_cli integration tests
|
||||
node dist/all/@angular/compiler_cli/src/main -p modules/@angular/compiler_cli/integrationtest
|
||||
|
||||
echo 'travis_fold:end:BUILD'
|
||||
|
||||
@@ -41,7 +41,7 @@ fi
|
||||
|
||||
# Append dist/all to the NODE_PATH so that cjs module resolver finds find the packages that use
|
||||
# absolute module ids (e.g. @angular/core)
|
||||
export NODE_PATH=${NODE_PATH}:$(pwd)/../../dist/all
|
||||
export NODE_PATH=${NODE_PATH}:$(pwd)/../../dist/all:$(pwd)/../../dist/tools
|
||||
export LOGS_DIR=/tmp/angular-build/logs
|
||||
|
||||
if [[ ${TRAVIS} ]]; then
|
||||
|
||||
@@ -15,20 +15,33 @@ source ./env.sh
|
||||
cd ../..
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.unit.tools'
|
||||
|
||||
# Run unit tests in tools
|
||||
node ./dist/tools/tsc-watch/ tools triggerCmds
|
||||
|
||||
echo 'travis_fold:end:test.unit.tools'
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.unit.node'
|
||||
gulp test.compiler_cli
|
||||
|
||||
# Run unit tests in node
|
||||
node ./dist/tools/tsc-watch/ node
|
||||
node ./dist/tools/tsc-watch/ node triggerCmds
|
||||
|
||||
echo 'travis_fold:end:test.unit.node'
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.compiler_cli.node'
|
||||
|
||||
echo 'travis_fold:start:test.unit.localChrome'
|
||||
# Run compiler_cli integration tests in node
|
||||
node dist/tools/cjs-jasmine -- @angular/compiler_cli/integrationtest/**/*_spec.js
|
||||
|
||||
echo 'travis_fold:end:test.compiler_cli.node'
|
||||
|
||||
# rebuild since codegen has overwritten some files.
|
||||
$(npm bin)/ng2tc -p modules/tsconfig.json
|
||||
node dist/all/@angular/compiler_cli/src/main -p modules/tsconfig.json
|
||||
|
||||
echo 'travis_fold:start:test.unit.localChrome'
|
||||
|
||||
# Run unit tests in local chrome
|
||||
if [[ ${TRAVIS} ]]; then
|
||||
|
||||
Reference in New Issue
Block a user