Added targets to allow building jquery with plugins; Creating the raw source files...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 23 Sep 2006 08:21:17 +0000 (08:21 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 23 Sep 2006 08:21:17 +0000 (08:21 +0000)
build.xml

index 0a01b5a..4a598ea 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,8 +1,12 @@
-<project name="jQuery" default="all" basedir=".">
+<project name="jQuery" default="all" basedir=".">\r
+       \r
+       <!-- SETUP -->
 
     <property name="SRC_DIR" value="src" />
     <property name="BUILD_DIR" value="build" />
-    <property name="JAR" value="${BUILD_DIR}/js.jar" />
+    <property name="JAR" value="${BUILD_DIR}/js.jar" />\r
+       \r
+       <property name="PLUGIN_DIR" location="../plugins" />
 
     <property name="PREFIX" value="." />
     <property name="DOCS_DIR" value="${PREFIX}/docs" />
     <property name="JQ" value="${DIST_DIR}/jquery.js" />
     <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
     <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
-    <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
-
+    <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />\r
+       <property name="JQ_TEMP" value="${DIST_DIR}/jquery.js.tmp" />
+\r
+       <!-- MAIN -->\r
+       \r
     <target name="jquery">
         <echo message="Building ${JQ}" />
         <mkdir dir="${DIST_DIR}" />
 
     <target name="all" depends="clean,jquery,lite,min,pack,docs,test" >
         <echo message="Build complete." />
-    </target>
+    </target>\r
+       \r
+       <!-- PLUGINS -->\r
+       \r
+       <target name="ifx" description="Build jquery with Interface fx plugins">\r
+               <antcall target="plugin">\r
+                       <param name="plugins" value="interface/ifx*.js" />\r
+               </antcall>\r
+       </target>\r
+       \r
+       <target name="plugindocs" description="Build documentation for a set of plugins - Not working, yet">\r
+               <antcall target="raw">\r
+                       <param name="plugins" value="center/*.js, cookie/*.js, form/*.js" />\r
+               </antcall>\r
+               <antcall target="docs" />\r
+       </target>\r
+       \r
+       <target name="raw" description="Build a set of plugins, without jquery itself">\r
+               <concat destfile="${JQ}">\r
+                       <fileset dir="${PLUGIN_DIR}" includes="${plugins}" />\r
+        </concat>\r
+               <echo message="${plugins} built." />\r
+       </target>\r
+       \r
+       <target name="plugin" depends="jquery" description="Build jquery with a given set of plugins, see ifx target for an example">\r
+               <copy tofile="${JQ_TEMP}" file="${JQ}"/>\r
+               <concat destfile="${JQ}">\r
+               <fileset file="${JQ_TEMP}" />\r
+                       <fileset dir="${PLUGIN_DIR}" includes="${plugins}" />\r
+        </concat>\r
+               <delete file="${JQ_TEMP}" />\r
+               <echo message="${JQ} with ${plugins} built." />\r
+       </target>
 
 </project>