Awesome
gulp-minimize
Gulp plugin for HTML minifiy.Based on minimize.
Thin wrapper over Swaagie's minimize.
Installation
Install package with NPM and add it to your development dependencies:
npm install gulp-minimize
Usage
var gulp = require('gulp');
var rename = require('gulp-rename');
var Minimize = require('gulp-minimize');
gulp.task('html', function() {
gulp.src('./index.html')
.pipe(Minimize())
.pipe(rename('min.html'))
.pipe(gulp.dest('.'));
});
API
Minimize({
empty:true,
cdata: true,
comments: false,
ssi: false,
conditionals: true,
spare: true,
quotes: true,
loose: true,
lowerCaseAttributeNames: false
})
See minimize for details and behavior for each option; the params are passed straight through.
License
MIT License (Expat)