projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f91b123
)
JsCompile.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 28 Jul 2011 14:39:23 +0000
(22:39 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 28 Jul 2011 14:39:23 +0000
(22:39 +0800)
JsCompile.php
patch
|
blob
|
history
diff --git
a/JsCompile.php
b/JsCompile.php
index
ad26719
..
d657891
100644
(file)
--- a/
JsCompile.php
+++ b/
JsCompile.php
@@
-69,14
+69,14
@@
class Pman_Core_JsCompile extends Pman
*
* @param {String} basedir absolute path to files
* @param {Array} list of files (ontop of basedir)
*
* @param {String} basedir absolute path to files
* @param {Array} list of files (ontop of basedir)
- * @param {String
|false
} output url (path to basedir basically), or false
+ * @param {String} output url (path to basedir basically), or false
* to not compile
*
*
*/
* to not compile
*
*
*/
- function packScript($basedir, $files, $output_url)
+ function packScript($basedir, $files, $output_url
, $no_compile=false
)
{
// this outputs <script tags..>
// either for just the original files,
{
// this outputs <script tags..>
// either for just the original files,
@@
-103,11
+103,11
@@
class Pman_Core_JsCompile extends Pman
$output = md5(serialize($arfiles)) .'.js';
$output = md5(serialize($arfiles)) .'.js';
- if (
$output_url
&& !file_exists($basedir.'/_cache_/'.$output)) {
+ if (
!$no_compile
&& !file_exists($basedir.'/_cache_/'.$output)) {
$this->pack($arfiles,$basedir.'/_cache_/'.$output);
}
$this->pack($arfiles,$basedir.'/_cache_/'.$output);
}
- if (
$output_url
&& file_exists($basedir.'/_cache_/'.$output)) {
+ if (
!$no_compile
&& file_exists($basedir.'/_cache_/'.$output)) {
echo '<script type="text/javascript" src="'.$output_url.'/_cache_/'. $output.'"></script>';
return;
echo '<script type="text/javascript" src="'.$output_url.'/_cache_/'. $output.'"></script>';
return;