projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d4d30e
)
JsCompile.php
author
Alan Knowles
<alan@roojs.com>
Tue, 3 Sep 2013 04:59:56 +0000
(12:59 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 3 Sep 2013 04:59:56 +0000
(12:59 +0800)
JsCompile.php
patch
|
blob
|
history
diff --git
a/JsCompile.php
b/JsCompile.php
index
ef7e97f
..
f4cd77c
100644
(file)
--- a/
JsCompile.php
+++ b/
JsCompile.php
@@
-81,6
+81,16
@@
class Pman_Core_JsCompile extends Pman
*
*/
*
*/
+ function jsSort($a,$b)
+ {
+ $a = substr($a, 0, -3);
+ $b= substr($b, 0, -3);
+ if ($a == $b) {
+ return 0;
+ }
+ return ($a > $b) ? +1 : -1;
+ }
+
function packScript($basedir, $files, $output_url, $compile=true)
{
function packScript($basedir, $files, $output_url, $compile=true)
{
@@
-110,15
+120,10
@@
class Pman_Core_JsCompile extends Pman
$ofiles [] = $f . '/'. basename($fx);
}
}
$ofiles [] = $f . '/'. basename($fx);
}
}
+ $tf =
// sort exc. the .js
// sort exc. the .js
- usort($ofiles,function($a,$b) {
- $a = substr($a, 0, -3);
- $b= substr($b, 0, -3);
- if ($a == $b) {
- return 0;
- }
- return ($a > $b) ? +1 : -1;
- });
+ usort($ofiles,create_function('$a,$b', 'return Pman_Core_JsCompile($a,$b);'));
+
//print_R($ofiles);
$output = md5(serialize($arfiles)) .'.js';
//print_R($ofiles);
$output = md5(serialize($arfiles)) .'.js';