minify html in a stream using html-minifier.
npm install html-minify-stream
var htmlMinifyStream = require('html-minify-stream')
fs.createReadStream('index.html')
.pipe(htmlMinifyStream({
collapseWhitespace: true,
removeOptionalTags: true
}))
.pipe(fs.createWriteStream('dist/index.html'))
Create a new minify stream. Write an html document to it. options
is an
options object for html-minifier.