openlayers/openlayers — pull request #528 by probins (2012-06-13 14:32:33+00:00)
Title: Add AMD and version options to build.py

Adds 2 new options to build.py

* s/status: adds ability to put version info as a comment at the front of the build file, as discussed in #463. Rather than try and get python to run git, I decided it would be simpler to just generalise it to adding a text file. That way people can use whatever they like in the way of timestamps, version info, or whatever. Should also address #26
* amd: this is intended for people like me who want to convert builds into modules for use with AMD loaders like requirejs. As I say in the help text, the pre-compile option lets Closure Compiler minimise the OpenLayers var, reducing the file size a few % more, but there are a couple of functions that don't work with this and will need fixing. I'll address these in a separate issue. If there's interest in using this with the hosted builds, it might be better to use one of the boilerplates at https://github.com/umdjs/umd - probably amdWeb which returns the OpenLayers var as either a module or a global depending on whether define/require is present.