projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
083caab
)
convert css compression to use csstidy
author
Alan
<alan@roojs.com>
Fri, 22 Oct 2021 04:54:50 +0000
(12:54 +0800)
committer
Alan
<alan@roojs.com>
Fri, 22 Oct 2021 04:54:50 +0000
(12:54 +0800)
JsCompile.php
patch
|
blob
|
history
diff --git
a/JsCompile.php
b/JsCompile.php
index
a5b9159
..
6fcd1ee
100644
(file)
--- a/
JsCompile.php
+++ b/
JsCompile.php
@@
-199,20
+199,19
@@
class Pman_Core_JsCompile extends Pman
function packCssCore($files, $output)
{
function packCssCore($files, $output)
{
-
- $o = HTML_FlexyFramework::get()->Pman_Core;
+
+ // csstidy
+ // cat x a b c | csstidy - --preserve_css=true --remove_bslash=false --silent=true --template=highest {out}
+
- if (empty($o['cssminify']) || !file_exists($o['cssminify'])) {
- echo '<!-- cssminify not set -->';
- return false;
- }
require_once 'System.php';
require_once 'System.php';
- $
seed= System::which('seed
');
- $
gjs = System::which('gjs
');
+ $
csstidy= System::which('csstidy
');
+ $
cat = System::which('cat
');
- if (!$seed && !$gjs) {
- echo '<!-- seed or gjs are not installed -->';
+
+ if (!$csstidy) {
+ echo '<!-- csstidy not installed -->';
return false;
}
return false;
}
@@
-230,9
+229,9
@@
class Pman_Core_JsCompile extends Pman
mkdir(dirname($output), 0755, true);
}
$eoutput = escapeshellarg($output);
mkdir(dirname($output), 0755, true);
}
$eoutput = escapeshellarg($output);
- $cmd = $seed ?
- ("$seed {$o['cssminify']} $eoutput " . implode($ofiles, ' ')) :
- ("$gjs {$o['cssminify']} -- -- $eoutput " . implode($ofiles, ' '));
+
+ $cmd = "$cat " . implode($ofiles, " ") . " | $csstidy - --preserve_css=true --remove_bslash=false --silent=true --template=highest $eoutput";
+
//echo "<PRE>$cmd\n"; echo `$cmd`; exit;
`$cmd`;
//echo "<PRE>$cmd\n"; echo `$cmd`; exit;
`$cmd`;