Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Latest commit

 

History

History
26 lines (20 loc) · 1.15 KB

File metadata and controls

26 lines (20 loc) · 1.15 KB

posthtml-minifier

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>'
  });