summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorwei <>2006-08-29 11:12:33 +0000
committerwei <>2006-08-29 11:12:33 +0000
commit13b256cdf8e3cef810d1b3dcf580be751b94c9fe (patch)
tree95ad1e52c74caae1df3b1af1eff2f9c048ce05af /buildscripts
parent07f24ace21f71baba4a3e278fad90033efb6fea2 (diff)
Add separate debug javascript build.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/jsbuilder/build.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php
index 654dc62b..dac7bd92 100644
--- a/buildscripts/jsbuilder/build.php
+++ b/buildscripts/jsbuilder/build.php
@@ -82,7 +82,7 @@ $libraries = array(
// 'extra/behaviour.js',
'extended/date.js',
-
+
//prado core
'prado/prado.js',
'prado/form.js',
@@ -151,7 +151,7 @@ foreach($libraries as $jsFile => $sourceFiles)
{
if(!empty($requestedLibs) && !in_array($jsFile,$requestedLibs))
continue;
- $libFile=TARGET_DIR.'/'.$jsFile;
+ //$libFile=TARGET_DIR.'/'.$jsFile;
echo "\nBuilding $jsFile...\n";
$contents='';
foreach($sourceFiles as $sourceJsFile)
@@ -159,17 +159,18 @@ foreach($libraries as $jsFile => $sourceFiles)
$sourceFile=SOURCE_DIR.'/'.$sourceJsFile;
if(!is_file($sourceFile))
echo "Source file not found: $sourceFile\n";
-
+
echo "...adding $sourceJsFile\n";
- $contents.=file_get_contents($sourceFile)."\n\n";
+ $contents.=file_get_contents($sourceFile)."\n\n";
}
- $tempFile=$libFile.'.tmp';
- file_put_contents($tempFile,$contents);
- $jsMin = new JSMin($tempFile, $libFile);
+ $debugFile=TARGET_DIR.'/debug/'.$jsFile;
+ $compressFile=TARGET_DIR.'/compressed/'.$jsFile;
+ file_put_contents($debugFile,$contents);
+ $jsMin = new JSMin($debugFile, $compressFile);
$jsMin -> minify();
unset($jsMin);
- @unlink($tempFile);
- echo "Saving file {$jsFile}\n";
+ //@unlink($tempFile);
+ echo "Saving file {$jsFile}\n";
$builds++;
}
@@ -184,7 +185,7 @@ if(isset($argv[1]) && preg_match('/(doc)+/', $argv[1]))
$command = sprintf(BUILD_DOC, $files);
system($command);
}
-else if($builds > 0)
+else if($builds > 0)
echo "\nJavascript build complete, {$builds} file(s) compressed.";
else
echo "No files to build.";