build.bat 1.8 KB

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