Commit f7172614 authored by Jörn Zaefferer's avatar Jörn Zaefferer

Improved jquery target to allow inclusion of plugins directly (specify via the...

Improved jquery target to allow inclusion of plugins directly (specify via the PLUGINS property), making a merge build easier; min/pack work, lite/docs/test ignores content of plugins files
parent 327bfb88
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<property name="BUILD_DIR" value="build" /> <property name="BUILD_DIR" value="build" />
<property name="JAR" value="${BUILD_DIR}/js.jar" /> <property name="JAR" value="${BUILD_DIR}/js.jar" />
<property name="PLUGIN_DIR" location="../plugins" /> <property name="PLUGIN_DIR" location="../plugins" />
<property name="PLUGINS" value="" />
<property name="PREFIX" value="." /> <property name="PREFIX" value="." />
<property name="DOCS_DIR" value="${PREFIX}/docs" /> <property name="DOCS_DIR" value="${PREFIX}/docs" />
<property name="TEST_DIR" value="${PREFIX}/test" /> <property name="TEST_DIR" value="${PREFIX}/test" />
...@@ -17,7 +18,6 @@ ...@@ -17,7 +18,6 @@
<property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" /> <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" />
<property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" /> <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
<property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" /> <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
<property name="JQ_TEMP" value="${DIST_DIR}/jquery.js.tmp" />
<!-- MAIN --> <!-- MAIN -->
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<fileset dir="${SRC_DIR}" includes="event/*.js" /> <fileset dir="${SRC_DIR}" includes="event/*.js" />
<fileset dir="${SRC_DIR}" includes="fx/*.js" /> <fileset dir="${SRC_DIR}" includes="fx/*.js" />
<fileset dir="${SRC_DIR}" includes="ajax/*.js" /> <fileset dir="${SRC_DIR}" includes="ajax/*.js" />
<fileset dir="${PLUGIN_DIR}" includes="${PLUGINS}" />
<fileset dir="${SRC_DIR}" includes="outro.js" /> <fileset dir="${SRC_DIR}" includes="outro.js" />
</concat> </concat>
<echo message="${JQ} built." /> <echo message="${JQ} built." />
...@@ -117,33 +118,15 @@ ...@@ -117,33 +118,15 @@
<!-- PLUGINS --> <!-- PLUGINS -->
<target name="ifx" description="Build jquery with Interface fx plugins"> <target name="ifx" description="Build jquery with Interface fx plugins">
<antcall target="plugin"> <antcall target="jquery">
<param name="plugins" value="interface/ifx*.js" /> <param name="PLUGINS" value="interface/ifx*.js" />
</antcall> </antcall>
</target> </target>
<target name="plugindocs" description="Build documentation for a set of plugins - Not working, yet"> <target name="cookieFormPager" description="Build jquery with cookie, form and pager plugins">
<antcall target="raw"> <antcall target="jquery">
<param name="plugins" value="center/*.js, cookie/*.js, form/*.js" /> <param name="PLUGINS" value="cookie/*.js,form/*.js,pager/*.js" />
</antcall> </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>
<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> </project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment