Gulp, html templates and fragment loading
问题 I want to import html fragments at various places in a generated html file when I run it through a gulp task. The following is my gulp task: gulp.task('build_html', function () { gulp.src('resources/index.html') .pipe(template({ident: '1'})) .pipe(gulp.dest('frontend')); }); Inside the index.html file is a lot of html I would like to load from fragments, for example a bootstrap dropdown menu <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">