summaryrefslogtreecommitdiff
path: root/buildscripts/jsbuilder/build.php
diff options
context:
space:
mode:
authorwei <>2006-04-25 00:27:44 +0000
committerwei <>2006-04-25 00:27:44 +0000
commitfd019bf034ef4dbedfc305c77fed0dbd83a732c4 (patch)
treeafc59b99826308924725074ee34e4f541a1d399a /buildscripts/jsbuilder/build.php
parent72a75d7d0f5681df3fd98c684ab6f22baefb365c (diff)
Add TListControlValidator. Update client-side validators, datepicker.js, colorpicker.js. Merge to 3.0 if necessary.
Diffstat (limited to 'buildscripts/jsbuilder/build.php')
-rw-r--r--buildscripts/jsbuilder/build.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php
index d5d04713..910f0394 100644
--- a/buildscripts/jsbuilder/build.php
+++ b/buildscripts/jsbuilder/build.php
@@ -27,6 +27,18 @@ 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'));
+/**
+ * Location of the perl JS doc generator.
+ */
+define('JS_DOC', realpath(dirname(__FILE__).'/JSDoc/jsdoc.pl'));
+/**
+ * Javascript documentation output directory.
+ */
+define('DOC_OUTPUT_DIR', realpath(dirname(__FILE__).'/../../docs/Javascript'));
+/**
+ * Javascript documentation build command
+ */
+define('BUILD_DOC', sprintf('perl "%s" --no-sources -d "%s" ', JS_DOC, DOC_OUTPUT_DIR).'%s');
if(SOURCE_DIR===false || TARGET_DIR===false)
die('Unable to determine the build path.');
@@ -154,7 +166,18 @@ foreach($libraries as $libFile => $sourceFiles)
echo "Saving file {$libFile}\n";
$builds++;
}
-if($builds > 0)
+if(preg_match('/doc*/', $argv[1]))
+{
+ $files = "";
+ foreach($libraries as $lib)
+ {
+ foreach($lib as $source)
+ $files .= sprintf(' "%s/%s"', SOURCE_DIR, $source);
+ }
+ $command = sprintf(BUILD_DOC, $files);
+ system($command);
+}
+else if($builds > 0)
echo "\nJavascript build complete, {$builds} file(s) compressed.";
else
echo "No files to build.";