From 51dd3736eb84b171b041f419f6fb8a7e8626b0f2 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sun, 13 Aug 2006 18:38:51 +0000 Subject: [PATCH] Moved docs stuff to build, to be created when the docs are actually built. --- Makefile | 43 +++++++++++++++++++--------- build/build.js | 2 +- build/docs.js | 4 +-- {docs => build/docs}/js/doc.js | 0 {docs => build/docs}/js/pager.js | 0 {docs => build/docs}/js/tooltip.js | 0 {docs => build/docs}/style/docs.xsl | 0 {docs => build/docs}/style/style.css | 0 8 files changed, 32 insertions(+), 17 deletions(-) rename {docs => build/docs}/js/doc.js (100%) rename {docs => build/docs}/js/pager.js (100%) rename {docs => build/docs}/js/tooltip.js (100%) rename {docs => build/docs}/style/docs.xsl (100%) rename {docs => build/docs}/style/style.css (100%) diff --git a/Makefile b/Makefile index de1821961..f949811aa 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,53 @@ SRC_DIR = src BUILD_DIR = build + DOCS_DIR = docs +DIST_DIR = dist MODULES = jquery event fx ajax -JQ = jquery-svn.js -JQ_PACK = jquery-svn.pack.js +JQ = ${DIST_DIR}/jquery.js +JQ_LITE = ${DIST_DIR}/jquery.lite.js +JQ_PACK = ${DIST_DIR}/jquery.pack.js -all: ${JQ} ${JQ_PACK} docs +all: jquery lite pack docs -${JQ}: - @@echo "Building jquery-svn.js"; +${DIST_DIR}: + mkdir -p ${DIST_DIR} + +jquery: ${DIST_DIR} ${JQ} + +${JQ}: + @@echo "Building" ${JQ}; @@for f in ${MODULES}; do \ echo "Adding module:" $$f;\ cat ${SRC_DIR}/$$f/$$f.js >> ${JQ};\ done - @@echo "jquery-svn.js built."; + @@echo ${JQ} "built."; + +lite: ${JQ_LITE} + +${JQ_LITE}: ${JQ} + @@echo "Building" ${JQ_LITE}; + java -jar ${BUILD_DIR}/js.jar ${BUILD_DIR}/lite.js ${JQ} ${JQ_LITE} + @@echo ${JQ_LITE} "built."; + +pack: ${JQ_PACK} ${JQ_PACK}: ${JQ} - @@echo "Building jquery-svn.pack.js"; - - cd ${BUILD_DIR} && java -jar js.jar build.js ../${JQ} ../${JQ_PACK} - - @@echo "jquery-svn.pack.js built."; + @@echo "Building" ${JQ_PACK}; + java -jar ${BUILD_DIR}/js.jar ${BUILD_DIR}/build.js ${JQ} ${JQ_PACK} + @@echo ${JQ_PACK} "built."; test: docs: ${JQ} @@echo "Building Documentation"; - cd ${BUILD_DIR} && java -jar js.jar docs.js ../${JQ} ../${DOCS_DIR} + java -jar ${BUILD_DIR}/js.jar ${BUILD_DIR}/docs.js ${JQ} ${DOCS_DIR} @@echo "Documentation built."; clean: - rm ${JQ} + rm -rf ${DIST_DIR} + rm -f ${DOCS_DIR}/index.xml + rm -f ${DOCS_DIR}/data/* diff --git a/build/build.js b/build/build.js index 7af650dd2..8c622ec47 100644 --- a/build/build.js +++ b/build/build.js @@ -1,4 +1,4 @@ -load("js/ParseMaster.js", "js/pack.js", "js/writeFile.js"); +load("build/js/ParseMaster.js", "build/js/pack.js", "build/js/writeFile.js"); var out = readFile( arguments[0] ); diff --git a/build/docs.js b/build/docs.js index e17e64d95..8186f9ddd 100644 --- a/build/docs.js +++ b/build/docs.js @@ -1,6 +1,4 @@ -load("js/json.js"); -load("js/xml.js"); -load("js/writeFile.js"); +load("build/js/json.js", "build/js/xml.js", "build/js/writeFile.js"); var types = { jQuery: "A jQuery object.", diff --git a/docs/js/doc.js b/build/docs/js/doc.js similarity index 100% rename from docs/js/doc.js rename to build/docs/js/doc.js diff --git a/docs/js/pager.js b/build/docs/js/pager.js similarity index 100% rename from docs/js/pager.js rename to build/docs/js/pager.js diff --git a/docs/js/tooltip.js b/build/docs/js/tooltip.js similarity index 100% rename from docs/js/tooltip.js rename to build/docs/js/tooltip.js diff --git a/docs/style/docs.xsl b/build/docs/style/docs.xsl similarity index 100% rename from docs/style/docs.xsl rename to build/docs/style/docs.xsl diff --git a/docs/style/style.css b/build/docs/style/style.css similarity index 100% rename from docs/style/style.css rename to build/docs/style/style.css