README.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. The OpenLayers build tool supports several different
  2. forms of compressing your javascript code, and a method
  3. of describing build profiles to create customized
  4. OpenLayers builds with only the components you need.
  5. When building a file, you can choose to build with several
  6. different compression options to the Python-based build.py
  7. script. The following is an example script:
  8. python build.py -c closure full OpenLayers-closure.js
  9. This script selects the 'closure' compression mechanism,
  10. uses a config file called 'full.cfg', and writes the output
  11. to OpenLayers-closure.js.
  12. The options available for compression are:
  13. * closure
  14. This requires you to have a closure-compiler.jar in your
  15. tools directory. You can do this by fetching the compiler
  16. from:
  17. http://closure-compiler.googlecode.com/files/compiler-latest.zip
  18. Then unzipping that file, and placing compiler.jar into tools
  19. and renaming it closure-compiler.jar.
  20. * closure_ws
  21. This uses the closure compiler webservice. This will only work
  22. for files source Javascript files which are under 1MB. (Note that
  23. the default OpenLayers full build is not under 1MB.)
  24. * jsmin
  25. jsmin is the default compiler, and uses the Python-based
  26. jsmin script to compress the Javascript.
  27. * minimize
  28. This is a simple whitespace removing Python script, designed
  29. to fill in when other tools are unavailable.
  30. * none
  31. None will leave the Javascript uncompressed.