minify html, and any CSS or JS included in your markup
npm install html-minify

This is a node.js module that minimize HTML files with any CSS & JS.
the css minify use cssmin,the html minify use the html-minifier
You can either download the plugin and unzip it into to your project folder or you can use npm to install the cssmin package.
``shell`
npm -g i html-minify
`shell`
%> htmlminify one.html
%> htmlminify -o one-min-utf8.html one-utf8.html //default charset is utf-8
%> htmlminify -o one-min-gbk.html one-gbk.html -c gbk
how to use?see this:
[]()
The module exports the html-minify function, so you can use it with :
`js`
var htmlminify = require('html-minify');
The function htmlminify takes two arguments :
* input : the html content you want to minimize.
* linebreakpos : the number of characters before the end of the line. If empty, the output will have only one line.
Example :
`js``
var puts = require('util').puts,
fs = require('fs'),
var htmlminify = require('./html-minify');
var text = fs.readFileSync("/Any/Random/HTML.html", encoding='utf8');
var min = htmlminify(text);
puts(min);