From de978229b20757489ccaa1f162be4a8c02d6160c Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 2 May 2016 15:52:47 -0600 Subject: [PATCH] chore(compiler): Run compiler_cli tests in new CI. Also update docs/peer deps, display errors from running jasmine, use the right location of cjs-jasmine --- gulpfile.js | 4 ++-- scripts/ci-lite/build.sh | 5 ++--- scripts/ci-lite/test_js.sh | 1 + tools/compiler_cli/README.md | 4 ++-- tools/compiler_cli/package.json | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index ca5bd7a564..83593bcb47 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -105,7 +105,7 @@ function runJasmineTests(globs, done) { var fork = require('child_process').fork; var args = ['--'].concat(globs); - fork('./tools/cjs-jasmine', args, {stdio: 'inherit'}) + fork('./dist/tools/cjs-jasmine', args, {stdio: 'inherit'}) .on('close', function jasmineCloseHandler(exitCode) { if (exitCode && treatTestErrorsAsFatal) { var err = new Error('Jasmine tests failed'); @@ -1068,7 +1068,7 @@ gulp.task('!test.compiler_cli.codegen', function(done) { require('./dist/tools/compiler_cli/main') .main("tools/compiler_cli/test") .then(done) - .catch(function(rej) { done(new Error(rej)); }); + .catch(function(rej) { done(rej); }); } catch (err) { done(err); } diff --git a/scripts/ci-lite/build.sh b/scripts/ci-lite/build.sh index dc7ecc4773..2714a6e9c3 100755 --- a/scripts/ci-lite/build.sh +++ b/scripts/ci-lite/build.sh @@ -10,8 +10,7 @@ source ./env.sh cd ../.. $(npm bin)/tsc -p ./tools/tsconfig.json -$(npm bin)/tsc -p ./modules/tsconfig.json - - +$(npm bin)/ng2tc -p ./modules/tsconfig.json +$(npm bin)/tsc -p ./tools/compiler_cli/src/tsconfig.json echo 'travis_fold:end:BUILD' diff --git a/scripts/ci-lite/test_js.sh b/scripts/ci-lite/test_js.sh index 2f57e7c7c7..2a2ecc73a0 100755 --- a/scripts/ci-lite/test_js.sh +++ b/scripts/ci-lite/test_js.sh @@ -16,6 +16,7 @@ cd ../.. echo 'travis_fold:start:test.unit.node' +gulp test.compiler_cli # Run unit tests in node node ./dist/tools/tsc-watch/ node diff --git a/tools/compiler_cli/README.md b/tools/compiler_cli/README.md index df612aec43..21610aa1e7 100644 --- a/tools/compiler_cli/README.md +++ b/tools/compiler_cli/README.md @@ -89,7 +89,7 @@ node ./dist/js/cjs/compiler_cli -p tools/compiler_cli/test Release: ``` $ gulp test.compiler_cli -$ cp tools/compiler_cli/README.md tools/compiler_cli/package.json dist/js/cjs/compiler_cli +$ cp tools/compiler_cli/README.md tools/compiler_cli/package.json dist/tools/compiler_cli # npm login as angularcore -$ npm publish dist/js/cjs/compiler_cli +$ npm publish dist/tools/compiler_cli ``` diff --git a/tools/compiler_cli/package.json b/tools/compiler_cli/package.json index 7c7859cb20..61ba603234 100644 --- a/tools/compiler_cli/package.json +++ b/tools/compiler_cli/package.json @@ -1,6 +1,6 @@ { "name": "angular2-template-compiler", - "version": "0.1.3", + "version": "0.1.9", "description": "Execute angular2 template compiler in nodejs.", "main": "index.js", "typings": "index.d.ts", @@ -15,9 +15,9 @@ }, "peerDependencies": { "typescript": "^1.8.0 || ^1.9.0-dev", - "@angular/compiler": "0.0.0-5", - "@angular/platform-server": "0.0.0-5", - "@angular/core": "0.0.0-5" + "@angular/compiler": "^0.0.0-5", + "@angular/platform-server": "^0.0.0-5", + "@angular/core": "^0.0.0-5" }, "repository": { "type": "git",