mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +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
|
||||
@@mkdir -p tmp/${NAME}
|
||||
@@cp -R index.html docs experiments external js/jquery.js tests css/themes/${THEME}/images tmp/${NAME}/
|
||||
@@cp ${OUTPUT}/${NAME}.min.css ${OUTPUT}/${NAME}.min.js tmp/${NAME}/
|
||||
# ... Update the JavaScript and CSS paths
|
||||
@@find tmp/${NAME} -type f \
|
||||
\( -name '*.html' -o -name '*.php' \) \
|
||||
-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' {} \;
|
||||
# ... Build the docs bundle
|
||||
@@java -XX:ReservedCodeCacheSize=64m \
|
||||
-classpath build/js.jar:build/google-compiler-20111003.jar org.mozilla.javascript.tools.shell.Main \
|
||||
external/r.js/dist/r.js \
|
||||
-o build/docs.build.js \
|
||||
dir=../tmp/${NAME}
|
||||
# ... Move and zip up the the whole folder
|
||||
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.docs.zip ${NAME}
|
||||
@@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