build.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. # Build script for dojox.mobile
  3. #
  4. # Note:
  5. # You may need to manually apply the following patch to your build script
  6. # in order to completely remove all the unused modules from your build.
  7. # The patch disables finding the dojo base modules being used from the
  8. # dependent modules with a simple pattern matching, which sometimes
  9. # unexpectedly picks up unused modules.
  10. # For example, if you see query.js and NodeList.js baked into your build,
  11. # while you are not using them, then it is worth trying the patch.
  12. # The file to be patched is util/buildscripts/jslib/buildUtil.js.
  13. #
  14. # --- buildUtil.js-orig
  15. # +++ buildUtil.js
  16. # @@ -1506,7 +1506,7 @@
  17. # var addedResources = {};
  18. # - while((matches = buildUtil.baseMappingRegExp.exec(tempContents))){
  19. # + while(false&&(matches = buildUtil.baseMappingRegExp.exec(tempContents))){
  20. # var baseResource = buildUtil.baseMappings[matches[1]];
  21. # //Make sure we do not add the dependency to its source resource.
  22. if [ $# -eq 0 ]; then
  23. echo 'Usage: build separate|single [webkit]'
  24. echo ' separate Create mobile.js that includes only dojox.mobile'
  25. echo ' single Create a single dojo.js layer that includes dojox.mobile'
  26. echo ' webkit Enable webkitMobile=true option (Loses PC browser support)'
  27. exit 1
  28. fi
  29. optimize=shrinksafe
  30. profile=mobile
  31. dir=release-mobile-separate
  32. webkit=
  33. if [ "$1" == "single" ]; then
  34. profile=mobile-all
  35. fi
  36. if [ "$1" == "single" ]; then
  37. dir=release-mobile-single
  38. fi
  39. if [ "$2" == "webkit" ]; then
  40. webkit=webkitMobile=true
  41. fi
  42. cd ../../../util/buildscripts
  43. ./build.sh profile=$profile action=release customDijitBase=true optimize=$optimize layerOptimize=$optimize cssOptimize=comments releaseDir=../../$dir/ $webkit
  44. cd ../../dojox/mobile/build