]> source.dussan.org Git - jquery.git/commitdiff
Added comments to various plugins and added make and ant options to make docs with...
authorYehuda Katz <wycats@gmail.com>
Thu, 26 Oct 2006 23:11:34 +0000 (23:11 +0000)
committerYehuda Katz <wycats@gmail.com>
Thu, 26 Oct 2006 23:11:34 +0000 (23:11 +0000)
Makefile
build.xml

index a906d0bf80ce848519ffdb2fe429419142088b93..baa06c404bd94f1a2cfe1d7b62c66bc0039d617c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,30 @@ PREFIX = .
 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
@@ -39,6 +57,15 @@ ${JQ}: ${MODULES}
        @@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}
index 0919aaa8ab0b90847c0b2ede2c8c9e7f8a49bd46..024dcd7999ac32896a6135728c321d9b59fe01cf 100644 (file)
--- a/build.xml
+++ b/build.xml
         </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}" />