minify HTML responses like some crazy guy
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test feat: update to koa 2 Jun 19, 2017
.gitignore add coverage Sep 16, 2014
.travis.yml feat: update to koa 2 Jun 19, 2017
LICENSE init Jun 13, 2014
README.md init Jun 13, 2014
index.js feat: update to koa 2 Jun 19, 2017
package-lock.json feat: update to koa 2 Jun 19, 2017
package.json feat: update to koa 2 Jun 19, 2017

README.md

Koa HTML Minifier

Middleware that minifies your HTML responses using html-minifier. It uses html-minifier's default options which are all turned off by default, so you have to set the options otherwise it's not going to do anything.

API

// do compression stuff first
app.use(require('koa-compress')());

// then use this minifier
app.use(require('koa-html-minifier')({
  collapseWhitespace: true
}));

Options

See: https://github.com/kangax/html-minifier#options-quick-reference