DOCS_DIR = ${PREFIX}/docs
TEST_DIR = ${PREFIX}/test
DIST_DIR = ${PREFIX}/dist
+PLUG_DIR = ../plugins
-MODULES = ${SRC_DIR}/intro.js\
- ${SRC_DIR}/jquery/*\
+BASE_FILES = ${SRC_DIR}/jquery/*\
${SRC_DIR}/event/*\
${SRC_DIR}/fx/*\
- ${SRC_DIR}/ajax/*\
+ ${SRC_DIR}/ajax/*
+
+PLUGINS = ${PLUG_DIR}/button/*\
+ ${PLUG_DIR}/center/*\
+ ${PLUG_DIR}/cookie/*\
+ ${PLUG_DIR}/form/*\
+ ${PLUG_DIR}/greybox/greybox.js\
+ ${PLUG_DIR}/interface/*\
+ ${PLUG_DIR}/pager/*\
+ ${PLUG_DIR}/tablesorter/*\
+ ${PLUG_DIR}/tabs/*
+
+MODULES = ${SRC_DIR}/intro.js\
+ ${BASE_FILES}\
+ ${SRC_DIR}/outro.js
+
+MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
+ ${BASE_FILES}\
+ ${PLUGINS}\
${SRC_DIR}/outro.js
JQ = ${DIST_DIR}/jquery.js
@@echo ${JQ} "Built"
@@echo
+with_plugins: ${MODULES_WITH_PLUGINS}
+ @@echo "Building" ${JQ}
+
+ @@mkdir -p ${DIST_DIR}
+ @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
+
+ @@echo ${JQ} "Built"
+ @@echo
+
lite: ${JQ_LITE}
${JQ_LITE}: ${JQ}
</concat>
<echo message="${JQ} built." />
</target>
+\r
+ <target name="with_plugins">\r
+ <echo message="Building ${JQ}" />\r
+ <mkdir dir="${DIST_DIR}" />\r
+ <concat destfile="${JQ}">\r
+ <fileset dir="${SRC_DIR}" includes="intro.js" />\r
+ <fileset dir="${SRC_DIR}" includes="jquery/*.js" />\r
+ <fileset dir="${SRC_DIR}" includes="event/*.js" />\r
+ <fileset dir="${SRC_DIR}" includes="fx/*.js" />\r
+ <fileset dir="${SRC_DIR}" includes="ajax/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="button/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="center/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="cookie/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="form/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="greybox/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="interface/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="pager/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="tablesorter/*.js" />\r
+ <fileset dir="${PLUGIN_DIR}" includes="tabs/*.js" />\r
+ <fileset dir="${SRC_DIR}" includes="outro.js" />\r
+ </concat>\r
+ <echo message="${JQ} built." />\r
+ </target>\r
<target name="lite" depends="jquery">
<echo message="Building ${JQ_LITE}" />
<arg value="${JQ_PACK}" />
</java>
<echo message="${JQ_PACK} built." />
- </target>
+ </target>\r
+ \r
+ <target name="pack_with_plugins" depends="with_plugins">\r
+ <echo message="Building ${JQ_PACK}" />\r
+ <java jar="${JAR}" fork="true">\r
+ <arg value="${BUILD_DIR}/build/pack.js" />\r
+ <arg value="${JQ}" />\r
+ <arg value="${JQ_PACK}" />\r
+ </java>\r
+ <echo message="${JQ_PACK} built." />\r
+ </target>
<target name="test" depends="jquery">
<echo message="Building Test Suite" />
<arg value="${DOCS_DIR}" />
</java>
<echo message="Documentation built." />
- </target>
+ </target>\r
+ \r
+ <target name="docs_with_plugins" depends="with_plugins">\r
+ <echo message="Building Documentation" />\r
+ <delete dir="${DOCS_DIR}" />\r
+ <mkdir dir="${DOCS_DIR}/data" />\r
+ <copy todir="${DOCS_DIR}" file="${BUILD_DIR}/docs/.htaccess" />\r
+ <mkdir dir="${DOCS_DIR}/js" />\r
+ <copy todir="${DOCS_DIR}/js" >\r
+ <fileset dir="${BUILD_DIR}/docs/js">\r
+ <include name="**/*.js"/>\r
+ </fileset>\r
+ </copy>\r
+ <copy todir="${DOCS_DIR}/style" >\r
+ <fileset dir="${BUILD_DIR}/docs/style">\r
+ <include name="**"/>\r
+ </fileset>\r
+ </copy>\r
+ <java jar="${JAR}" fork="true">\r
+ <arg value="${BUILD_DIR}/docs/docs.js" />\r
+ <arg value="${JQ}" />\r
+ <arg value="${DOCS_DIR}" />\r
+ </java>\r
+ <echo message="Documentation built." />\r
+ </target>
<target name="clean">
<delete dir="${DOCS_DIR}" />