2017 © Pedro Peláez
 

library html_minifier

A PHP package to minify HTMLs, CSSs and Javascripts.

image

doncadavona/html_minifier

A PHP package to minify HTMLs, CSSs and Javascripts.

  • Monday, June 26, 2017
  • by doncadavona
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 50 % Grown

The README.md

This is a work in Progress

HTML Minifier

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

A PHP package to minify HTMLs, Javascripts and CSSs. Supports PSR-4 Autoloader., (*2)

Install

Via Composer, (*3)

``` bash $ composer require doncadavona/html_minifier, (*4)


## Usage ``` php use DonCadavona\HtmlMinifier\HtmlMinifier; // Sample HTML string $html = ' <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> html { padding-top: 20px; } body { margin: 0px; } </style> </head> <body> <h1>Hello World</h1> <script> // This is single-line a comment. /* This is a multi-line comment. */ /** * This is a doc block comment. */ </script> </body> </html> '; // Minify the HTML echo HtmlMinifier::minify($html); // <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><style type="text/css"> html { padding-top: 20px; } body { margin: 0px; } </style></head><body>

Hello World

</body></html> // Minify the HTML and remove JavaScripts and CSSs: echo HtmlMinifier::minify($html, true, true); // <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body>

Hello World

</body></html>

Change log

Please see CHANGELOG for more information on what has changed recently., (*5)

Testing

bash $ composer test, (*6)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*7)

Security

If you discover any security related issues, please email dcadavona@gmail.com instead of using the issue tracker., (*8)

Credits

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

26/06 2017

dev-1.0.0-dev

dev-1.0.0-dev https://github.com/doncadavona/html_minifier

A PHP package to minify HTMLs, CSSs and Javascripts.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

css javascript html minifier minify compress minification compressor minimize html_minifier

26/06 2017

dev-master

9999999-dev https://github.com/doncadavona/html_minifier

A PHP package to minify HTMLs, CSSs and Javascripts.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

css javascript html minifier minify compress minification compressor minimize html_minifier