posthtml-minifier

August 19, 2016 ยท View on GitHub

Build Status Coverage Status npm version Dependency Status devDependency Status

PostHTML plugin that wraps HTMLMinifier.

Usage

var posthtml = require('posthtml');
var minifier = require('posthtml-minifier');

posthtml()
  .use(minifier({ removeComments: true }))
  .process('<html><body><!-- a comment --></body></html>')
  .then(function(result) {
    console.log(result.html); //=> '<html><body></body></html>'
  });