goto-bus-stop / html-minify-stream

minify html in a stream using html-minifier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

html-minify-stream

minify html in a stream using html-minifier.

npm travis standard

Install

npm install html-minify-stream

Usage

var htmlMinifyStream = require('html-minify-stream')

fs.createReadStream('index.html')
  .pipe(htmlMinifyStream({
    collapseWhitespace: true,
    removeOptionalTags: true
  }))
  .pipe(fs.createWriteStream('dist/index.html'))

API

htmlMinifyStream(?options)

Create a new minify stream. Write an html document to it. options is an options object for html-minifier.

License

MIT

About

minify html in a stream using html-minifier.

License:MIT License


Languages

Language:JavaScript 100.0%