Hey,
The example in the documentation may not be compatible with Gulp 5 and the merge2 package. It should be replaced with merge-stream instead. The merge2 package only works with Gulp 4. With Gulp 5, the merge2 package throws the following error Error: Writable stream closed prematurely while running this example:
gulp.task('scripts', function() {
var tsResult = gulp.src('lib/**/*.ts')
.pipe(ts({
declaration: true
}));
return merge([
tsResult.dts.pipe(gulp.dest('release/definitions')),
tsResult.js.pipe(gulp.dest('release/js'))
]);
});
This might be confusing for some developers since most of us run npm install gulp, which installs the latest version by default. Hope this helps!
Hey,
The example in the documentation may not be compatible with Gulp 5 and the
merge2package. It should be replaced withmerge-streaminstead. Themerge2package only works with Gulp 4. With Gulp 5, themerge2package throws the following errorError: Writable stream closed prematurelywhile running this example:This might be confusing for some developers since most of us run
npm install gulp, which installs the latest version by default. Hope this helps!