@@ -612,33 +612,29 @@ gulp.task('build.tools', ['build/clean.tools'], function(done) {
612612
613613// private task to build tools
614614gulp . task ( '!build.tools' , function ( ) {
615- var tsResult = gulp . src ( [ 'tools/**/*.ts' ] )
615+ var stream = gulp . src ( [ 'tools/**/*.ts' ] )
616616 . pipe ( sourcemaps . init ( ) )
617- . pipe ( tsc ( { target : 'ES5' , module : 'commonjs' , reporter : tsc . reporter . nullReporter ( ) ,
617+ . pipe ( tsc ( { target : 'ES5' , module : 'commonjs' ,
618618 // Don't use the version of typescript that gulp-typescript depends on, we need 1.5
619619 // see https://github.com/ivogabe/gulp-typescript#typescript-version
620620 typescript : require ( 'typescript' ) } ) )
621621 . on ( 'error' , function ( error ) {
622- // gulp-typescript doesn't propagate errors from the src stream into the js stream so we are
623- // forwarding the error into the merged stream
624- mergedStream . emit ( 'error' , error ) ;
622+ // nodejs doesn't propagate errors from the src stream into the final stream so we are
623+ // forwarding the error into the final stream
624+ stream . emit ( 'error' , error ) ;
625+ } )
626+ . pipe ( sourcemaps . write ( '.' ) )
627+ . pipe ( gulp . dest ( 'dist/tools' ) )
628+ . on ( 'end' , function ( ) {
629+ var AngularBuilder = require ( './dist/tools/broccoli/angular_builder' ) . AngularBuilder ;
630+ angularBuilder = new AngularBuilder ( {
631+ outputPath : 'dist' ,
632+ dartSDK : DART_SDK ,
633+ logs : logs
634+ } ) ;
625635 } ) ;
626636
627- var destDir = gulp . dest ( 'dist/tools/' ) ;
628-
629- var mergedStream = merge2 ( [
630- tsResult . js . pipe ( sourcemaps . write ( '.' ) ) . pipe ( destDir ) ,
631- tsResult . js . pipe ( destDir )
632- ] ) . on ( 'end' , function ( ) {
633- var AngularBuilder = require ( './dist/tools/broccoli/angular_builder' ) . AngularBuilder ;
634- angularBuilder = new AngularBuilder ( {
635- outputPath : 'dist' ,
636- dartSDK : DART_SDK ,
637- logs : logs
638- } ) ;
639- } ) ;
640-
641- return mergedStream ;
637+ return stream ;
642638} ) ;
643639
644640gulp . task ( 'broccoli.js.dev' , [ 'build.tools' ] , function ( done ) {
0 commit comments