mini-html

1.0.3 • Public • Published

miniHTML

A very simple HTML minifier. It will almost definitely break your site if you use PRE or CODE or TEXTAREA with formatting defined by line breaks and tabs etc. Otherwise it will aggressively shrink your HTML.

Usage

Import the node module:

`npm install mini-html`

Minify a HTML file:

var miniHTML = require("mini-html");
var minimized = miniHTML("<html> \n\t<head> \n\t<.......\n\n\n\n\n\t\t\t\t\t\t\t\t\t<body>..."); 
console.log(minimized); // <html><head><..........

Minify a HTML file:

var minimized = miniHTML(null, __dirname + "/index.html");

Minify a HTML file and save it

miniHTML(null, __dirname + "/index.html", true);

Readme

Keywords

Package Sidebar

Install

npm i mini-html

Weekly Downloads

5

Version

1.0.3

License

MIT

Last publish

Collaborators

  • benlowry