Skip to content
Browse files

use as much of grunt as possible for docs, make sure the jqm demo js …

…is concatenated before the docs are built
  • Loading branch information...
1 parent adfc3b7 commit 9c37667e200f0bea0d92d1e56aadeb8d8c8715bd @johnbender johnbender committed Feb 20, 2013
Showing with 5 additions and 7 deletions.
  1. +1 −2 Makefile
  2. +2 −3 build/bin/docs.sh
  3. +1 −1 build/tasks/legacy.js
  4. +1 −1 grunt.js
View
3 Makefile
@@ -34,8 +34,7 @@ js: init
#
# -------------------------------------------------
docs: init js css
- @@${ARGS} bash build/bin/docs.sh
- @@${ARGS} node node_modules/.bin/grunt concat:demosjs
+ @@${ARGS} node node_modules/.bin/grunt docs
# Output a message saying the process is complete
notify: init
View
5 build/bin/docs.sh
@@ -11,11 +11,10 @@ cp -r docs tmp/demos/
# ... Copy css and images
cp compiled/*.css tmp/demos/css/themes/$THEME
cp -r compiled/images tmp/demos/css/themes/$THEME
-# ... replace "js/" with "js/jquery.mobile.js"
# NOTE the deletion here is required by gnu/bsd sed differences
# reset the docs specific js reference
-find tmp/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@_assets/js/\"@_assets/js/$DEMOSNAME.js\"@" {} \;
+find tmp/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@_assets/js/.*\"@_assets/js/$DEMOSNAME.js\"@" {} \;
find tmp/demos -name "*$SED_INPLACE_EXT" -exec rm {} \;
# reset the javascript references
@@ -87,7 +86,7 @@ clear_zip_files $OUTPUT
cd tmp/demos && zip -rq ../../$OUTPUT/$NAME.docs.zip * && cd -
# clean out the compiled directory demos and cp the new output
-rm -rf $OUTPUT/demos && mv -f tmp/demos $OUTPUT
+cp -R tmp/demos $OUTPUT
# Finish by removing the temporary files
rm -rf tmp
View
2 build/tasks/legacy.js
@@ -12,7 +12,7 @@ module.exports = function( grunt ) {
env: 'IS_DEPLOY_TARGET=true'
},
docs: {
- deps: [ 'init', 'js', 'css' ]
+ deps: []
},
init: {},
js: {
View
2 grunt.js
@@ -212,7 +212,7 @@ module.exports = function( grunt ) {
grunt.registerTask('test', 'config:test:pages config:test junit');
// Ease of use aliases for users who want the zip and docs
- grunt.registerTask('docs', 'js css legacy_tasks:docs concat:demosjs');
+ grunt.registerTask('docs', 'clean js css concat:demosjs legacy_tasks:docs');
grunt.registerTask('zip', 'js css legacy_tasks:zip');
// load the project's default tasks

0 comments on commit 9c37667

Please sign in to comment.
Something went wrong with that request. Please try again.