From 6f0631c97856bfbf68f54a8cf2bedc4e74fc4703 Mon Sep 17 00:00:00 2001 From: Ivo Gabe de Wolff Date: Thu, 28 May 2015 22:00:41 +0200 Subject: [PATCH] build(gulp): remove unnecessary stream merging in build.tools Also remove the reporter config which is wrong and has no effect. Closes #2209 --- gulpfile.js | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 5ea79f5fb2..9d3a7ddf75 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -612,33 +612,29 @@ gulp.task('build.tools', ['build/clean.tools'], function(done) { // private task to build tools gulp.task('!build.tools', function() { - var tsResult = gulp.src(['tools/**/*.ts']) + var stream = gulp.src(['tools/**/*.ts']) .pipe(sourcemaps.init()) - .pipe(tsc({target: 'ES5', module: 'commonjs', reporter: tsc.reporter.nullReporter(), + .pipe(tsc({target: 'ES5', module: 'commonjs', // Don't use the version of typescript that gulp-typescript depends on, we need 1.5 // see https://github.com/ivogabe/gulp-typescript#typescript-version typescript: require('typescript')})) .on('error', function(error) { - // gulp-typescript doesn't propagate errors from the src stream into the js stream so we are - // forwarding the error into the merged stream - mergedStream.emit('error', error); + // nodejs doesn't propagate errors from the src stream into the final stream so we are + // forwarding the error into the final stream + stream.emit('error', error); + }) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('dist/tools')) + .on('end', function() { + var AngularBuilder = require('./dist/tools/broccoli/angular_builder').AngularBuilder; + angularBuilder = new AngularBuilder({ + outputPath: 'dist', + dartSDK: DART_SDK, + logs: logs + }); }); - var destDir = gulp.dest('dist/tools/'); - - var mergedStream = merge2([ - tsResult.js.pipe(sourcemaps.write('.')).pipe(destDir), - tsResult.js.pipe(destDir) - ]).on('end', function() { - var AngularBuilder = require('./dist/tools/broccoli/angular_builder').AngularBuilder; - angularBuilder = new AngularBuilder({ - outputPath: 'dist', - dartSDK: DART_SDK, - logs: logs - }); - }); - - return mergedStream; + return stream; }); gulp.task('broccoli.js.dev', ['build.tools'], function(done) {