openlayers/openlayers — pull request #1071 by markhepburn (2013-08-07 05:25:17+00:00)
Title: Closure amd pre

Hi, this is a reimplementation of #1034, which I ended up dropping to avoid complications with my employer at the time signing a contribution agreement (I'm now unemployed, and have sent an individual's agreement off).

For quick reference, this enables the --amd=pre option to work with the closure and uglify-js compiler options. Previously this failed because those compilers expect file-names as argument, not the file contents. This patch works around that by writing the contents to a temporary file when required.

I also removed the note in the options-help about the OpenLayers variable being required internally; as far as I can see #1005 removes this.

I tested with lite.cfg and mobile.cfg; closure and closure_ws now give the same results with amd=pre (thanks to @probins for the suggestion)