1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-30 09:09:54 +02:00

Make CSSmin the default CSS compressor

This commit is contained in:
Steve Clay
2015-09-28 20:30:20 -04:00
parent db1ea29133
commit 0bc3769802
14 changed files with 33 additions and 41 deletions

View File

@@ -34,7 +34,7 @@ if (isset($_POST['method']) && $_POST['method'] === 'Minify and serve') {
$sourceSpec['minifyOptions']['jsMinifier'] = array('JSMin\\JSMin', 'minify');
}
if (isset($_POST['minCss'])) {
$sourceSpec['minifyOptions']['cssMinifier'] = array('Minify_CSS', 'minify');
$sourceSpec['minifyOptions']['cssMinifier'] = array('Minify_CSSmin', 'minify');
}
$source = new Minify_Source($sourceSpec);
Minify_Logger::setLogger(FirePHP::getInstance(true));
@@ -50,14 +50,14 @@ if (isset($_POST['method']) && $_POST['method'] === 'Minify and serve') {
}
$tpl = array();
$tpl['classes'] = array('Minify_HTML', 'JSMin\\JSMin', 'Minify_CSS', 'Minify_CSSmin', 'JSMinPlus');
$tpl['classes'] = array('Minify_HTML', 'JSMin\\JSMin', 'Minify_CSS', 'Minify_CSS', 'JSMinPlus');
if (isset($_POST['method']) && in_array($_POST['method'], $tpl['classes'])) {
$args = array($textIn);
if ($_POST['method'] === 'Minify_HTML') {
$args[] = array(
'cssMinifier' => array('Minify_CSS', 'minify')
'cssMinifier' => array('Minify_CSSmin', 'minify')
,'jsMinifier' => array('JSMin\\JSMin', 'minify')
);
}