Added the new jQuery.support object and removed all uses of jQuery.browser from withi...
[jquery.git] / build.xml
1 <project name="jQuery" default="jquery" basedir=".">
2
3     <!--
4     To get jQuery even smaller, remove the modules you don't need by removing the fileset elements
5         in the jquery-target, for example leaving only these:
6
7         <fileset dir="${SRC_DIR}" includes="intro.js" />
8     <fileset dir="${SRC_DIR}" includes="core.js" />
9     <fileset dir="${SRC_DIR}" includes="selector.js" />
10     <fileset dir="${SRC_DIR}" includes="event.js" />
11     <fileset dir="${SRC_DIR}" includes="outro.js" />
12
13         That'd remove ajax, fx and offset support, leaving basic selectors, manipulation and event handling.
14     -->
15
16     <!-- SETUP -->
17
18     <property description="Source Folder" name="SRC_DIR" value="src"  />
19     <property description="Files for parsing etc." name="BUILD_DIR" value="build" />
20     <property description="Rhino JS Engine" name="JAR" value="${BUILD_DIR}/js.jar" />
21
22     <property description="Folder for jquery, min, lite and packed target" name="DIST_DIR" value="./dist" />
23
24     <!-- Files names for distribution -->
25     <property name="JQ" value="${DIST_DIR}/jquery.js" />
26     <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
27     <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
28     <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
29
30     <!-- MAIN -->
31
32     <target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
33         <echo message="Building ${JQ}" />
34         <mkdir dir="${DIST_DIR}" />
35         <concat destfile="${JQ}">
36             <fileset dir="${SRC_DIR}" includes="intro.js" />
37             <fileset dir="${SRC_DIR}" includes="core.js" />
38             <fileset dir="${SRC_DIR}" includes="support.js" />
39             <fileset dir="${SRC_DIR}" includes="selector.js" />
40             <fileset dir="${SRC_DIR}" includes="event.js" />
41             <fileset dir="${SRC_DIR}" includes="ajax.js" />
42             <fileset dir="${SRC_DIR}" includes="fx.js" />
43             <fileset dir="${SRC_DIR}" includes="offset.js" />
44             <fileset dir="${SRC_DIR}" includes="dimensions.js" />
45             <fileset dir="${SRC_DIR}" includes="outro.js" />
46         </concat>
47         <java jar="${JAR}" fork="true">
48             <arg value="${BUILD_DIR}/build/version.js" />
49             <arg value="${JQ}" />
50         </java>
51         <echo message="${JQ} built." />
52     </target>
53
54     <target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
55         <echo message="Building ${JQ_MIN}" />
56         <java jar="${JAR}" fork="true">
57             <arg value="${BUILD_DIR}/build/min.js" />
58             <arg value="${JQ}" />
59             <arg value="${JQ_MIN}" />
60         </java>
61         <echo message="${JQ_MIN} built." />
62     </target>
63
64     <target name="pack" depends="jquery" description="Remove all comments and whitespace and compress">
65         <echo message="Building ${JQ_PACK}" />
66         <java jar="${JAR}" fork="true">
67             <arg value="${BUILD_DIR}/build/pack.js" />
68             <arg value="${JQ}" />
69             <arg value="${JQ_PACK}" />
70         </java>
71         <echo message="${JQ_PACK} built." />
72     </target>
73
74         <target name="runtest">
75                 <echo message="Running Automated Test Suite" />
76                 <java jar="${JAR}" fork="true">
77             <arg value="${BUILD_DIR}/runtest/test.js" />
78         </java>
79                 <echo message="Test Suite Finished" />
80         </target>
81
82     <target name="clean">
83         <delete dir="${DIST_DIR}" />
84     </target>
85
86     <target name="all" depends="clean,jquery,min,pack">
87         <echo message="Build complete." />
88     </target>
89
90 </project>