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
22 <property name="TABS" value="${PLUGIN_DIR}/tabs/tabs.js" />
\r
23 <property name="TABS_PACK" value="${DIST_DIR}/jquery.tabs.pack.js" />
\r
27 <target name="jquery">
28 <echo message="Building ${JQ}" />
29 <mkdir dir="${DIST_DIR}" />
30 <concat destfile="${JQ}">
\r
31 <fileset dir="${SRC_DIR}" includes="intro.js" />
32 <fileset dir="${SRC_DIR}" includes="jquery/*.js" />
33 <fileset dir="${SRC_DIR}" includes="event/*.js" />
34 <fileset dir="${SRC_DIR}" includes="fx/*.js" />
35 <fileset dir="${SRC_DIR}" includes="ajax/*.js" />
\r
36 <fileset dir="${PLUGIN_DIR}" includes="${PLUGINS}" />
\r
37 <fileset dir="${SRC_DIR}" includes="outro.js" />
39 <echo message="${JQ} built." />
42 <target name="lite" depends="jquery">
43 <echo message="Building ${JQ_LITE}" />
44 <java jar="${JAR}" fork="true">
45 <arg value="${BUILD_DIR}/build/lite.js" />
47 <arg value="${JQ_LITE}" />
49 <echo message="${JQ_LITE} built." />
52 <target name="min" depends="jquery">
53 <echo message="Building ${JQ_MIN}" />
54 <java jar="${JAR}" fork="true">
55 <arg value="${BUILD_DIR}/build/min.js" />
57 <arg value="${JQ_MIN}" />
59 <echo message="${JQ_MIN} built." />
62 <target name="pack" depends="jquery">
63 <echo message="Building ${JQ_PACK}" />
64 <java jar="${JAR}" fork="true">
65 <arg value="${BUILD_DIR}/build/pack.js" />
67 <arg value="${JQ_PACK}" />
69 <echo message="${JQ_PACK} built." />
72 <target name="test" depends="jquery">
73 <echo message="Building Test Suite" />
74 <delete dir="${TEST_DIR}" />
75 <mkdir dir="${TEST_DIR}/data" />
\r
76 <copy todir="${TEST_DIR}/data">
\r
77 <fileset dir="${BUILD_DIR}/test/data/" />
\r
79 <java jar="${JAR}" fork="true">
80 <arg value="${BUILD_DIR}/test/test.js" />
82 <arg value="${TEST_DIR}" />
84 <echo message="Test Suite built." />
87 <target name="docs" depends="jquery">
88 <echo message="Building Documentation" />
89 <delete dir="${DOCS_DIR}" />
90 <mkdir dir="${DOCS_DIR}/data" />
91 <copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />
92 <mkdir dir="${DOCS_DIR}/js" />
93 <copy todir="${DOCS_DIR}/js" >
94 <fileset dir="${BUILD_DIR}/docs/js">
95 <include name="**/*.js"/>
98 <copy todir="${DOCS_DIR}/style" >
99 <fileset dir="${BUILD_DIR}/docs/style">
103 <java jar="${JAR}" fork="true">
104 <arg value="${BUILD_DIR}/docs/docs.js" />
105 <arg value="${JQ}" />
106 <arg value="${DOCS_DIR}" />
108 <echo message="Documentation built." />
111 <target name="clean">
112 <delete dir="${DOCS_DIR}" />
113 <delete dir="${TEST_DIR}" />
114 <delete dir="${DIST_DIR}" />
117 <target name="all" depends="clean,jquery,lite,min,pack,docs,test" >
118 <echo message="Build complete." />
123 <target name="ifx" description="Build jquery with Interface fx plugins">
\r
124 <antcall target="jquery">
\r
125 <param name="PLUGINS" value="interface/ifx*.js" />
\r
129 <target name="cookieFormPager" description="Build jquery with cookie, form and pager plugins">
\r
130 <antcall target="jquery">
\r
131 <param name="PLUGINS" value="cookie/*.js,form/*.js,pager/*.js" />
\r
135 <target name="pack_tabs">
\r
136 <echo message="Building ${TABS_PACK}" />
\r
137 <java jar="${JAR}" fork="true">
\r
138 <arg value="${BUILD_DIR}/build/pack.js" />
\r
139 <arg value="${TABS}" />
\r
140 <arg value="${TABS_PACK}" />
\r
142 <echo message="${TABS_PACK} built." />
\r