I need to merge 2 files with gulp. Like
concat = require('gulp-concat')
gulp.src(['file1', 'file2'])
.pipe(concat('merge'))
.pipe(gulp.dest('dest/'));
But without lines duplication. So if two files contains same line, merge file needs to contain this line only once.
file1
lineA
lineB
lineC
file2
lineD
lineA
lineF
merge
lineA
lineB
lineC
lineD
lineF
Is there some plugin for this? Help please)
You need to use a buffer mapper, here is an example with map-stream: