#gulp-concat-html
This plugin allows you to concatenate all html files recursively, all of them selected from a directory. The main purpose of this plugin is to generate a style guide from a set of partials (HTMLs).
$ npm install --save-dev gulp-concat-html
index.html
<!DOCTYPE html>
<html>
<head></head>
<body>
<div class="menu">
<!-- sg-nav -->
<!-- endsg-nav -->
</div>
....
<div class="styleguide">
<!-- styleguide -->
<!-- endstyleguide -->
</div>
<body>
</html>
var gulp = require('gulp');
var concatHtml = require('gulp-concat-html');
gulp.src('app/partials/**/*.html')
.pipe(concatHtml.build())
.pipe(concat("temp.html"))
.pipe(concatHtml.replaceHtml("index.html", "index.html"))
.pipe(gulp.dest('public'));
Type: String
index.html
HTML template
Type: String
index.html
Generated HTML
MIT - Copyright © 2014 Juan David Andrade