mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-28 07:34:00 +00:00
Rewrote "docs" target to take advantage of r.js' whole project optimization added build profile docs.build.js
This commit is contained in:
parent
f269788492
commit
716fe684d1
2 changed files with 25 additions and 9 deletions
16
Makefile
16
Makefile
|
|
@ -78,16 +78,14 @@ css: init
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
docs: init css js
|
docs: init
|
||||||
# Create the Demos/Docs/Tests/Tools
|
# Create the Demos/Docs/Tests/Tools
|
||||||
@@mkdir -p tmp/${NAME}
|
# ... Build the docs bundle
|
||||||
@@cp -R index.html docs experiments external js/jquery.js tests css/themes/${THEME}/images tmp/${NAME}/
|
@@java -XX:ReservedCodeCacheSize=64m \
|
||||||
@@cp ${OUTPUT}/${NAME}.min.css ${OUTPUT}/${NAME}.min.js tmp/${NAME}/
|
-classpath build/js.jar:build/google-compiler-20111003.jar org.mozilla.javascript.tools.shell.Main \
|
||||||
# ... Update the JavaScript and CSS paths
|
external/r.js/dist/r.js \
|
||||||
@@find tmp/${NAME} -type f \
|
-o build/docs.build.js \
|
||||||
\( -name '*.html' -o -name '*.php' \) \
|
dir=../tmp/${NAME}
|
||||||
-exec perl -pi -e \
|
|
||||||
's|js/"|${NAME}.min.js"|g;s|css/themes/default/|${NAME}.min.css|g;s|js/jquery.js"|jquery.js"|g' {} \;
|
|
||||||
# ... Move and zip up the the whole folder
|
# ... Move and zip up the the whole folder
|
||||||
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.docs.zip ${NAME}
|
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.docs.zip ${NAME}
|
||||||
@@mv tmp/${NAME} ${OUTPUT}/demos
|
@@mv tmp/${NAME} ${OUTPUT}/demos
|
||||||
|
|
|
||||||
18
build/docs.build.js
Normal file
18
build/docs.build.js
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
({
|
||||||
|
appDir: "..",
|
||||||
|
baseUrl: "js",
|
||||||
|
dir: "../compiled/demos",
|
||||||
|
|
||||||
|
optimize: "none",
|
||||||
|
|
||||||
|
//Finds require() dependencies inside a require() or define call.
|
||||||
|
findNestedDependencies: true,
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
name: "jquery.mobile.docs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
dirExclusionRegExp: /^\.|^build|^compiled/
|
||||||
|
})
|
||||||
Loading…
Reference in a new issue