mirror of
https://github.com/mrclay/minify.git
synced 2025-09-09 05:30:41 +02:00
Make CSSmin the default CSS compressor
This commit is contained in:
@@ -85,7 +85,7 @@ class Minify {
|
||||
|
||||
'minifiers' => array(
|
||||
Minify::TYPE_JS => array('JSMin\\JSMin', 'minify'),
|
||||
Minify::TYPE_CSS => array('Minify_CSS', 'minify'),
|
||||
Minify::TYPE_CSS => array('Minify_CSSmin', 'minify'),
|
||||
Minify::TYPE_HTML => array('Minify_HTML', 'minify'),
|
||||
),
|
||||
'minifierOptions' => array(), // no minifier options
|
||||
@@ -293,7 +293,7 @@ class Minify {
|
||||
if ($this->options['contentType'] === self::TYPE_JS) {
|
||||
$source->setMinifier("");
|
||||
} elseif ($this->options['contentType'] === self::TYPE_CSS) {
|
||||
$source->setMinifier(array('Minify_CSS', 'minify'));
|
||||
$source->setMinifier(array('Minify_CSSmin', 'minify'));
|
||||
$sourceOpts = $source->getMinifierOptions();
|
||||
$sourceOpts['compress'] = false;
|
||||
$source->setMinifierOptions($sourceOpts);
|
||||
|
@@ -13,6 +13,8 @@
|
||||
* @package Minify
|
||||
* @author Stephen Clay <steve@mrclay.org>
|
||||
* @author http://code.google.com/u/1stvamp/ (Issue 64 patch)
|
||||
*
|
||||
* @deprecated Use Minify_CSSmin
|
||||
*/
|
||||
class Minify_CSS {
|
||||
|
||||
|
@@ -13,10 +13,18 @@
|
||||
* including the ie5/mac filter (and its inversion), but expect tricky
|
||||
* hacks involving comment tokens in 'content' value strings to break
|
||||
* minimization badly. A test suite is available.
|
||||
*
|
||||
*
|
||||
* Note: This replaces a lot of spaces with line breaks. It's rumored
|
||||
* (https://github.com/yui/yuicompressor/blob/master/README.md#global-options)
|
||||
* that some source control tools and old browsers don't like very long lines.
|
||||
* Compressed files with shorter lines are also easier to diff. If this is
|
||||
* unacceptable please use CSSmin instead.
|
||||
*
|
||||
* @package Minify
|
||||
* @author Stephen Clay <steve@mrclay.org>
|
||||
* @author http://code.google.com/u/1stvamp/ (Issue 64 patch)
|
||||
*
|
||||
* @deprecated Use CSSmin (tubalmartin/cssmin)
|
||||
*/
|
||||
class Minify_CSS_Compressor {
|
||||
|
||||
|
@@ -52,7 +52,7 @@ class Minify_Controller_Page extends Minify_Controller_Base {
|
||||
if (isset($options['minifyAll'])) {
|
||||
// this will be the 2nd argument passed to Minify_HTML::minify()
|
||||
$sourceSpec['minifyOptions'] = array(
|
||||
'cssMinifier' => array('Minify_CSS', 'minify')
|
||||
'cssMinifier' => array('Minify_CSSmin', 'minify')
|
||||
,'jsMinifier' => array('JSMin\\JSMin', 'minify')
|
||||
);
|
||||
unset($options['minifyAll']);
|
||||
|
Reference in New Issue
Block a user