Minify CSS and JS
This commit is contained in:
parent
c07b714a0d
commit
f168cf6863
|
@ -96,6 +96,9 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
|
|||
while (list(, $element) = each($elements)) {
|
||||
$path = realpath($base . '/' . $element);
|
||||
$contents .= "\n\n" . file_get_contents($path);
|
||||
$contents = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $contents);
|
||||
$contents = str_replace(': ', ':', $contents);
|
||||
$contents = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $contents);
|
||||
// $contents = fn_minify_css($contents);
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue
Block a user