- <!-- TODO refactor to remove duplication with above -->
- <target name="docs_with_plugins" depends="jquery_with_plugins">
- <echo message="Building Documentation" />
- <delete dir="${DOCS_DIR}" />
- <mkdir dir="${DOCS_DIR}/data" />
- <copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />
- <mkdir dir="${DOCS_DIR}/js" />
- <copy todir="${DOCS_DIR}/js">
- <fileset dir="${BUILD_DIR}/docs/js">
- <include name="**/*.js" />
- </fileset>
- </copy>
- <copy todir="${DOCS_DIR}/style">
- <fileset dir="${BUILD_DIR}/docs/style">
- <include name="**" />
+ <!-- Files names for distribution -->
+ <property name="JQ" value="${DIST_DIR}/jquery.js" />
+ <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
+ <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
+ <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
+ <loadfile property="version" srcfile="version.txt" />
+
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="build/ant-contrib-0.6.jar"/>
+ </classpath>
+ </taskdef>
+ <exec executable="svn" outputproperty="svnlog.out" >
+ <arg line="info ."/>
+ </exec>
+ <propertyregex property="revision" input="${svnlog.out}" select="\1">
+ <regexp pattern="Revision: ([0-9]*)"/>
+ </propertyregex>
+ <propertyregex property="date" input="${svnlog.out}" select="\1">
+ <regexp pattern="Date: (.+\))"/>
+ </propertyregex>
+
+ <!-- MAIN -->
+
+ <target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
+ <echo message="Building ${JQ}" />
+ <mkdir dir="${DIST_DIR}" />
+ <concat destfile="${JQ}">
+ <fileset dir="${SRC_DIR}" includes="intro.js" />
+ <fileset dir="${SRC_DIR}" includes="core.js" />
+ <fileset dir="${SRC_DIR}" includes="data.js" />
+ <fileset dir="${SRC_DIR}" includes="selector.js" />
+ <fileset dir="${SRC_DIR}" includes="traversing.js" />
+ <fileset dir="${SRC_DIR}" includes="attributes.js" />
+ <fileset dir="${SRC_DIR}" includes="manipulation.js" />
+ <fileset dir="${SRC_DIR}" includes="event.js" />
+ <fileset dir="${SRC_DIR}" includes="support.js" />
+ <fileset dir="${SRC_DIR}" includes="ajax.js" />
+ <fileset dir="${SRC_DIR}" includes="fx.js" />
+ <fileset dir="${SRC_DIR}" includes="offset.js" />
+ <fileset dir="${SRC_DIR}" includes="dimensions.js" />
+ <fileset dir="${SRC_DIR}" includes="outro.js" />
+ </concat>
+ <replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
+ <replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" />
+ <replaceregexp match="Revision: " replace="Revision: ${revision}" file="${JQ}" />
+ <echo message="${JQ} built." />
+ </target>
+
+ <target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
+ <echo message="Building ${JQ_MIN}" />
+ <apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}">
+ <fileset dir="${DIST_DIR}">
+ <include name="jquery.js" />