Download the PHP package codealfa/minify without Composer
On this page you can find all versions of the php package codealfa/minify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download codealfa/minify
More information about codealfa/minify
Files in codealfa/minify
Download codealfa/minify
More information about codealfa/minify
Files in codealfa/minify
Vendor codealfa
Package minify
Short Description An extremely fast PHP based minification library for Javascript, CSS, Html and Json scripts using Regex Parsing
License GPL-3.0-or-later
Package minify
Short Description An extremely fast PHP based minification library for Javascript, CSS, Html and Json scripts using Regex Parsing
License GPL-3.0-or-later
Please rate this library. Is it a good library?
Informations about the package minify
JCH Minify
An extremely fast PHP-based minification library for JavaScript, CSS, HTML and JSON scripts using Regex Parsing
Installation
Run the following command to use the library in your projects:
Basic Usage
You can use any of the minifiers in the following way:
HTML Minifier Options
Pass an HtmlOptions value to the HTML minifier:
cssMinifier(defaultnull): Callback function to minify the contents of in-page<style>elements.jsMinifier(defaultnull): Callback function to minify the contents of in-page<script>elements.jsonMinifier(defaultnull): Callback function to minify the contents of in-page json contents. The Html Minifer will inspect thetypeattribute ofscriptcontents to determine if it's javascript or json.minifyLevel(default0): Determine the minification level of the HTML. Possible values are:0: Runs of whitespace outside elements are reduced to one whitespace, if a line feed is included it will be preserved. (HTML comments are not removed). In-page scripts and styles are minified if callback functions were provided.1: HTML comments are removed, along with whitespaces around block elements. Unnecessary whitespaces inside elements and around attributes are removed.2: Redundant attributes eg.,type="text/javascript"are removed. Quotes are removed from selected attributes if the isHtml5 option is set totrue.
isXhtml(defaultfalse): HTML content treated as XHTML1.0. In-page javascript content with characters that needs escaping in XML will be surrounded by/*<![CDATA[*/and/*]]>*/isHtml5(defaultfalse): If set totruethen whenminifyLevelis set to2, quotes are removed from attibutes if they don't contain characters that necessitates quoting.
Example:
For migrating an existing options array, use HtmlOptions::fromArray($options).
Html::minify() is an alias of Html::optimize().
License
GPL-3.0 or later
All versions of minify with dependencies
PHP Build Version
Package Version
The package codealfa/minify contains the following files
Loading the files please wait ...