gulp-assets
gulp-assets copied to clipboard
Option to keep HTML files in the stream?
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?
:+1:
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/'));
});