1 <project name="jQuery" default="all" basedir=".">
\r
5 <property name="SRC_DIR" value="src" />
6 <property name="BUILD_DIR" value="build" />
7 <property name="JAR" value="${BUILD_DIR}/js.jar" />
\r
9 <property name="PLUGIN_DIR" location="../plugins" />
\r
10 <property name="PLUGINS" value="none" />
\r
12 <property name="PREFIX" value="." />
13 <property name="DOCS_DIR" value="${PREFIX}/docs" />
14 <property name="TEST_DIR" value="${PREFIX}/test" />
15 <property name="DIST_DIR" value="${PREFIX}/dist" />
17 <property name="JQ" value="${DIST_DIR}/jquery.js" />
18 <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
19 <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
20 <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
\r
24 <target name="jquery">
25 <echo message="Building ${JQ}" />
26 <mkdir dir="${DIST_DIR}" />
27 <concat destfile="${JQ}">
\r
28 <fileset dir="${SRC_DIR}" includes="intro.js" />
29 <fileset dir="${SRC_DIR}" includes="jquery/*.js" />
30 <fileset dir="${SRC_DIR}" includes="event/*.js" />
31 <fileset dir="${SRC_DIR}" includes="fx/*.js" />
32 <fileset dir="${SRC_DIR}" includes="ajax/*.js" />
\r
33 <fileset dir="${PLUGIN_DIR}" includes="${PLUGINS}" />
\r
34 <fileset dir="${SRC_DIR}" includes="outro.js" />
36 <echo message="${JQ} built." />
39 <target name="lite" depends="jquery">
40 <echo message="Building ${JQ_LITE}" />
41 <java jar="${JAR}" fork="true">
42 <arg value="${BUILD_DIR}/build/lite.js" />
44 <arg value="${JQ_LITE}" />
46 <echo message="${JQ_LITE} built." />
49 <target name="min" depends="jquery">
50 <echo message="Building ${JQ_MIN}" />
51 <java jar="${JAR}" fork="true">
52 <arg value="${BUILD_DIR}/build/min.js" />
54 <arg value="${JQ_MIN}" />
56 <echo message="${JQ_MIN} built." />
59 <target name="pack" depends="jquery">
60 <echo message="Building ${JQ_PACK}" />
61 <java jar="${JAR}" fork="true">
62 <arg value="${BUILD_DIR}/build/pack.js" />
64 <arg value="${JQ_PACK}" />
66 <echo message="${JQ_PACK} built." />
69 <target name="test" depends="jquery">
70 <echo message="Building Test Suite" />
71 <delete dir="${TEST_DIR}" />
72 <mkdir dir="${TEST_DIR}/data" />
\r
73 <copy todir="${TEST_DIR}/data">
\r
74 <fileset dir="${BUILD_DIR}/test/data/" />
\r
76 <java jar="${JAR}" fork="true">
77 <arg value="${BUILD_DIR}/test/test.js" />
79 <arg value="${TEST_DIR}" />
81 <echo message="Test Suite built." />
84 <target name="docs" depends="jquery">
85 <echo message="Building Documentation" />
86 <delete dir="${DOCS_DIR}" />
87 <mkdir dir="${DOCS_DIR}/data" />
88 <copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />
89 <mkdir dir="${DOCS_DIR}/js" />
90 <copy todir="${DOCS_DIR}/js" >
91 <fileset dir="${BUILD_DIR}/docs/js">
92 <include name="**/*.js"/>
95 <copy todir="${DOCS_DIR}/style" >
96 <fileset dir="${BUILD_DIR}/docs/style">
100 <java jar="${JAR}" fork="true">
101 <arg value="${BUILD_DIR}/docs/docs.js" />
102 <arg value="${JQ}" />
103 <arg value="${DOCS_DIR}" />
105 <echo message="Documentation built." />
108 <target name="clean">
109 <delete dir="${DOCS_DIR}" />
110 <delete dir="${TEST_DIR}" />
111 <delete dir="${DIST_DIR}" />
114 <target name="all" depends="clean,jquery,lite,min,pack,docs,test" >
115 <echo message="Build complete." />
120 <target name="ifx" description="Build jquery with Interface fx plugins">
\r
121 <antcall target="jquery">
\r
122 <param name="PLUGINS" value="interface/ifx*.js" />
\r
126 <target name="cookieFormPager" description="Build jquery with cookie, form and pager plugins">
\r
127 <antcall target="jquery">
\r
128 <param name="PLUGINS" value="cookie/*.js,form/*.js,pager/*.js" />
\r