Prune your HTML using https://github.com/thlorenz/prune-html
First, install gulp-prune-html
as a development dependency:
npm install --save-dev gulp-prune-html
Then, add it to your gulpfile.js
:
var prune-html = require('gulp-prune-html');
gulp.task('default', function(){
gulp.src('index.html')
.pipe(prune-html(['h1', '.details', 'h3'])
.pipe(gulp.dest('build'));
});
Prune HTML file based on the css selectors.