1 <project name="jQuery" default="jquery" basedir=".">
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:
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" />
13 That'd remove ajax, fx and offset support, leaving basic selectors, manipulation and event handling.
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" />
22 <property description="Folder for jquery, min, lite and packed target" name="DIST_DIR" value="./dist" />
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" />
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="selector.js" />
39 <fileset dir="${SRC_DIR}" includes="event.js" />
40 <fileset dir="${SRC_DIR}" includes="ajax.js" />
41 <fileset dir="${SRC_DIR}" includes="fx.js" />
42 <fileset dir="${SRC_DIR}" includes="offset.js" />
43 <fileset dir="${SRC_DIR}" includes="dimensions.js" />
44 <fileset dir="${SRC_DIR}" includes="outro.js" />
46 <java jar="${JAR}" fork="true">
47 <arg value="${BUILD_DIR}/build/version.js" />
50 <echo message="${JQ} built." />
53 <target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
54 <echo message="Building ${JQ_MIN}" />
55 <java jar="${JAR}" fork="true">
56 <arg value="${BUILD_DIR}/build/min.js" />
58 <arg value="${JQ_MIN}" />
60 <echo message="${JQ_MIN} built." />
63 <target name="pack" depends="jquery" description="Remove all comments and whitespace and compress">
64 <echo message="Building ${JQ_PACK}" />
65 <java jar="${JAR}" fork="true">
66 <arg value="${BUILD_DIR}/build/pack.js" />
68 <arg value="${JQ_PACK}" />
70 <echo message="${JQ_PACK} built." />
73 <target name="runtest">
74 <echo message="Running Automated Test Suite" />
75 <java jar="${JAR}" fork="true">
76 <arg value="${BUILD_DIR}/runtest/test.js" />
78 <echo message="Test Suite Finished" />
82 <delete dir="${DIST_DIR}" />
85 <target name="all" depends="clean,jquery,min,pack">
86 <echo message="Build complete." />