I want to use gulp to concat some html files in order, and some of them are duplicates.
For example:
gulp.task('Generate HTML', function(cb) {
const srcset = [
'header.html',
'content.html',
'section2.html',
'banner-cat.html',
'section3.html',
'banner-cat.html',
'section4.html',
'content.html',
'content.html',
'banner.html',
'footer.html'
];
gulp.src(srcset, {'allowEmpty': true, 'nounique': true, 'nosort': true})
.pipe(concat('index.html'))
.pipe(gulp.dest('public/'));
cb();
});
I found the options no-unique and no-sort in the documentation so I thought that would solve my problem, however I am not getting the desired result, as every html snippet is only concat-ed one time, so any duplicated snippets will only show up once.
Please help me with any advice or if you know any other gulp package that can help me achieve this desired outcome using gulp and javascript