Skip to content

Commit 6f0631c

Browse files
ivogabeIgorMinar
authored andcommitted
build(gulp): remove unnecessary stream merging in build.tools
Also remove the reporter config which is wrong and has no effect. Closes angular#2209
1 parent e5d06e4 commit 6f0631c

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

gulpfile.js

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -612,33 +612,29 @@ gulp.task('build.tools', ['build/clean.tools'], function(done) {
612612

613613
// private task to build tools
614614
gulp.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

644640
gulp.task('broccoli.js.dev', ['build.tools'], function(done) {

0 commit comments

Comments
 (0)