Download the PHP package wa72/html-pretty-min without Composer
On this page you can find all versions of the php package wa72/html-pretty-min. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wa72/html-pretty-min
More information about wa72/html-pretty-min
Files in wa72/html-pretty-min
Download wa72/html-pretty-min
More information about wa72/html-pretty-min
Files in wa72/html-pretty-min
Vendor wa72
Package html-pretty-min
Short Description HTML minifier and indenter that works on the DOM tree
License MIT
Package html-pretty-min
Short Description HTML minifier and indenter that works on the DOM tree
License MIT
Please rate this library. Is it a good library?
Informations about the package html-pretty-min
HTML Pretty-Min
HTML Pretty-Min is a PHP library for minifying and prettyprinting (indenting) HTML documents that works directly on the DOM tree of an HTML document.
Currently it has the following features:
-
Prettyprint:
- Indent Block-level elements, do not indent inline elements
- Minify:
- Remove whitespace and newlines
- Compress embedded Javascript using mrclay/jsmin-php
- Compress embedded CSS using tubalmartin/cssmin
- Remove some attributes when their value is empty (by default "style" and "class" attributes)
- Remove comments, except those matching some given regular expressions (by default, IE conditional comments are kept)
Installation
HTML Pretty-Min is listed on Packagist.
composer require wa72/html-pretty-min
Usage
For prettyprinting, call the indent()
method instead of minify()
.
Attention: Because the formatting is done directly on the DOM tree, a DOMDocument object given to the load()
method
will be modified:
All versions of html-pretty-min with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
mrclay/jsmin-php Version ^2.3
tubalmartin/cssmin Version ^4
symfony/options-resolver Version >=2.3
mrclay/jsmin-php Version ^2.3
tubalmartin/cssmin Version ^4
symfony/options-resolver Version >=2.3
The package wa72/html-pretty-min contains the following files
Loading the files please wait ....