gulp-assets icon indicating copy to clipboard operation
gulp-assets copied to clipboard

Option to keep HTML files in the stream?

Open callumlocke opened this issue 11 years ago • 2 comments

It seems that gulp-assets only outputs assets, and does not keep the HTML file in the stream.

Could you add an option to output the input HTML files too?

callumlocke avatar Mar 03 '15 16:03 callumlocke

:+1:

heme avatar Mar 16 '15 20:03 heme

Found a way around this. Doesn't really fulfill the underlying request, but will let you work with both streams in one task.

gulp.task('index-html', ['clean-index'], function () {
    // create html stream
    var htmlStream = gulp.src(['/sourceDir/index.html']);
    // move assets
    indexHTML
        .pipe(assets({
                js: true,
                css: true
            }))
        .pipe(gulp.dest('/buildDir/'));
    // move index
    return indexHTML.pipe(gulp.dest('/buildDir/'));
});

heme avatar Mar 16 '15 22:03 heme