build(gulp): remove unnecessary stream merging in build.tools

Also remove the reporter config which is wrong and has no effect.

Closes #2209
This commit is contained in:
Ivo Gabe de Wolff 2015-05-28 22:00:41 +02:00 committed by Igor Minar
parent e5d06e479a
commit 6f0631c978
1 changed files with 16 additions and 20 deletions

View File

@ -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) {