Added targets to allow building jquery with plugins; Creating the raw source files with plugins added works, packed/docs/tests not yet

This commit is contained in:
Jörn Zaefferer 2006-09-23 08:21:17 +00:00
parent 065be00c4a
commit c79f069138

View file

@ -1,9 +1,13 @@
<project name="jQuery" default="all" basedir=".">
<!-- SETUP -->
<property name="SRC_DIR" value="src" />
<property name="BUILD_DIR" value="build" />
<property name="JAR" value="${BUILD_DIR}/js.jar" />
<property name="PLUGIN_DIR" location="../plugins" />
<property name="PREFIX" value="." />
<property name="DOCS_DIR" value="${PREFIX}/docs" />
<property name="TEST_DIR" value="${PREFIX}/test" />
@ -13,6 +17,9 @@
<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" />
<property name="JQ_TEMP" value="${DIST_DIR}/jquery.js.tmp" />
<!-- MAIN -->
<target name="jquery">
<echo message="Building ${JQ}" />
@ -107,4 +114,36 @@
<echo message="Build complete." />
</target>
<!-- PLUGINS -->
<target name="ifx" description="Build jquery with Interface fx plugins">
<antcall target="plugin">
<param name="plugins" value="interface/ifx*.js" />
</antcall>
</target>
<target name="plugindocs" description="Build documentation for a set of plugins - Not working, yet">
<antcall target="raw">
<param name="plugins" value="center/*.js, cookie/*.js, form/*.js" />
</antcall>
<antcall target="docs" />
</target>
<target name="raw" description="Build a set of plugins, without jquery itself">
<concat destfile="${JQ}">
<fileset dir="${PLUGIN_DIR}" includes="${plugins}" />
</concat>
<echo message="${plugins} built." />
</target>
<target name="plugin" depends="jquery" description="Build jquery with a given set of plugins, see ifx target for an example">
<copy tofile="${JQ_TEMP}" file="${JQ}"/>
<concat destfile="${JQ}">
<fileset file="${JQ_TEMP}" />
<fileset dir="${PLUGIN_DIR}" includes="${plugins}" />
</concat>
<delete file="${JQ_TEMP}" />
<echo message="${JQ} with ${plugins} built." />
</target>
</project>