1 <project name="jQuery" default="jquery" basedir=".">
3 <property description="Source Folder" name="SRC_DIR" value="src" />
4 <property description="Files for parsing etc." name="BUILD_DIR" value="build" />
5 <property description="YUICompressor" name="YUICompressor" value="${BUILD_DIR}/yuicompressor-2.4.2.jar" />
6 <loadfile description="Version to build" property="version" srcfile="version.txt" />
8 <property description="Folder for jquery and min target" name="DIST_DIR" value="./dist" />
10 <property name="JQ" value="${DIST_DIR}/jquery.js" />
11 <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
12 <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
13 <loadfile property="version" srcfile="version.txt" />
15 <target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
16 <echo message="Building ${JQ}" />
17 <mkdir dir="${DIST_DIR}" />
18 <concat destfile="${JQ}">
19 <fileset dir="${SRC_DIR}" includes="intro.js" />
20 <fileset dir="${SRC_DIR}" includes="core.js" />
21 <fileset dir="${SRC_DIR}" includes="support.js" />
22 <fileset dir="${SRC_DIR}" includes="data.js" />
23 <fileset dir="${SRC_DIR}" includes="queue.js" />
24 <fileset dir="${SRC_DIR}" includes="event.js" />
25 <fileset dir="${SRC_DIR}" includes="selector.js" />
26 <fileset dir="${SRC_DIR}" includes="traversing.js" />
27 <fileset dir="${SRC_DIR}" includes="attributes.js" />
28 <fileset dir="${SRC_DIR}" includes="manipulation.js" />
29 <fileset dir="${SRC_DIR}" includes="css.js" />
30 <fileset dir="${SRC_DIR}" includes="ajax.js" />
31 <fileset dir="${SRC_DIR}" includes="fx.js" />
32 <fileset dir="${SRC_DIR}" includes="offset.js" />
33 <fileset dir="${SRC_DIR}" includes="dimensions.js" />
34 <fileset dir="${SRC_DIR}" includes="outro.js" />
36 <replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
37 <replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" />
38 <replaceregexp match="Revision: " replace="Revision: ${revision}" file="${JQ}" />
39 <echo message="${JQ} built." />
42 <target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
43 <echo message="Building ${JQ_MIN}" />
44 <apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}">
45 <fileset dir="${DIST_DIR}">
46 <include name="jquery.js" />
49 <arg path="${YUICompressor}" />
50 <arg value="--charset" />
54 <mapper type="glob" from="jquery.js" to="jquery.min.js" />
56 <echo message="${JQ_MIN} built." />
59 <target name="runtest">
60 <echo message="Running Automated Test Suite" />
61 <java jar="${JAR}" fork="true">
62 <arg value="${BUILD_DIR}/runtest/test.js" />
64 <echo message="Test Suite Finished" />
68 <delete dir="${DIST_DIR}" />
71 <target name="openAjaxMetadata">
72 <property name="target" value="openAjaxMetadata-jquery-${version}.xml" />
73 <delete file="dist/jquery-*.xml" />
74 <get src="http://www.exfer.net/jquery/createjQueryXMLDocs.py?version=1.3" dest="${target}" />
75 <xslt includes="${target}" excludes="build.xml" destdir="./dist" style="build/style.xsl" extension=".xml" />
76 <delete file="${target}" />