gulp plugin to sanitize HTML (partial).
Issues with the HTML parser and output should be reported on the sanitize-html issue tracker.
Install with npm
npm i gulp-sanitize-html --save-dev
var gulp = require('gulp');
var sanitizeHtml = require('gulp-sanitize-html');
gulp.task('minify', function() {
return gulp.src('src/*.html')
.pipe(sanitizeHtml.transform({collapseWhitespace: true}))
.pipe(gulp.dest('dist'))
});
See the sanitize-html docs for options.
Install dev dependencies:
npm i && mocha
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Thierry Charbonnel
Copyright (c) 2016 Thierry Charbonnel
Released under the MIT license