teambition / merge2

Merge multiple streams into one stream in sequence or parallel (~119M/month downloads).
MIT License
170 stars 14 forks source link

Can no longer pipe to merge src #18

Closed onebitrocket closed 6 years ago

onebitrocket commented 6 years ago

Hi,

Can you please provide some insight to why the gulp-merge plugin was deprecated? This has been a project dependency for some considerable time.

This change cause issues with any historical code base in any git branch that references gulp-merge. It also means any other developer that works on the code will experience the same issue.

The issue i am seeing is if i add a pipe to the first source, the second source is ignored

var gulp = require('gulp'),
    gulpConcat = require('gulp-concat'),
    gulpMainBowerFiles = require('gulp-main-bower-files'),
    gulpMerge = require('gulp-merge');

gulp.task('css', function () {

  return gulpMerge (
    gulp.src('./bower.json')
    .pipe(gulpMainBowerFiles('**/*.*css', {
      includeDev: 'exclusive',
      group: 'css'
    })),
    gulp.src('./source/css/styles.css')
  )
  .pipe(gulpConcat('stylesheet.css'))
  .pipe(gulp.dest('./build/css'))

});

However if i ever if i reverse the sources to be merged the pipes are obeyed and both sources are merged.

How can I make the first source pass through the pipe?

Thanks

zensh commented 6 years ago

try merge2 v1.2.1