summaryrefslogtreecommitdiff
path: root/buildscripts/jsbuilder
diff options
context:
space:
mode:
authorwei <>2006-05-26 06:32:38 +0000
committerwei <>2006-05-26 06:32:38 +0000
commit73bd670dc8cdefbc4ab6cae56848bd14bdfb04c4 (patch)
tree80be0ac82432c6c92c5c40e92401afa8815c7847 /buildscripts/jsbuilder
parent9e8c47274843d78b68bf3515d26d78438e725528 (diff)
Test case for #28
Diffstat (limited to 'buildscripts/jsbuilder')
-rw-r--r--buildscripts/jsbuilder/build.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php
index 68bbe427..654dc62b 100644
--- a/buildscripts/jsbuilder/build.php
+++ b/buildscripts/jsbuilder/build.php
@@ -22,11 +22,11 @@
/**
* The root directory for storing all source js files
*/
-define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts'));
+define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts'));
/**
* The directory for storing compressed js files
*/
-define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts/js'));
+define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts/js'));
/**
* Location of the perl JS doc generator.
*/
@@ -147,20 +147,20 @@ $builds = 0;
/**
* loop through all target files and build them one by one
*/
-foreach($libraries as $libFile => $sourceFiles)
+foreach($libraries as $jsFile => $sourceFiles)
{
- if(!empty($requestedLibs) && !in_array($libFile,$requestedLibs))
+ if(!empty($requestedLibs) && !in_array($jsFile,$requestedLibs))
continue;
- $libFile=TARGET_DIR.'/'.$libFile;
- echo "\nBuilding $libFile...\n";
+ $libFile=TARGET_DIR.'/'.$jsFile;
+ echo "\nBuilding $jsFile...\n";
$contents='';
- foreach($sourceFiles as $sourceFile)
+ foreach($sourceFiles as $sourceJsFile)
{
- $sourceFile=SOURCE_DIR.'/'.$sourceFile;
+ $sourceFile=SOURCE_DIR.'/'.$sourceJsFile;
if(!is_file($sourceFile))
echo "Source file not found: $sourceFile\n";
- echo "...adding $sourceFile\n";
+ echo "...adding $sourceJsFile\n";
$contents.=file_get_contents($sourceFile)."\n\n";
}
$tempFile=$libFile.'.tmp';
@@ -169,10 +169,11 @@ foreach($libraries as $libFile => $sourceFiles)
$jsMin -> minify();
unset($jsMin);
@unlink($tempFile);
- echo "Saving file {$libFile}\n";
+ echo "Saving file {$jsFile}\n";
$builds++;
}
-if(isset($argv[1]) && preg_match('/doc*/', $argv[1]))
+
+if(isset($argv[1]) && preg_match('/(doc)+/', $argv[1]))
{
$files = "";
foreach($libraries as $lib)