This is more of a concern than an issue: why not make this a closure component?
ca0v opened this issue · comments
The ol library files all begin with goog.provide(nameOfModule). I think it would make sense for extension developers to make their modules closure compatible I personally dislike the fact that OL3 is build upon closure instead of AMD so a fix like this would be just fine with me:
define(function() {
ol.Overlay.Popup = function(opt_options) {
...
return ol.Overlay.Popup;
});
@ca0v I did consider using the Closure library when I first wrote the ol3-popup and ol3-layerswitcher.
So far I've decided against it as I believe it would require either a) users of the extensions to build ol3 from source with the extension or b) bundling the dependent parts of the Closure lib in a standalone build which would make the output quite large and duplicate much of the core Clojure lib already compiled into ol3.
@elemoine might be able to provide some guidance.
Closing this as OL3 is gradually looking to remove the dependency on Google Closure, see: openlayers/openlayers#4128
For the sake of accuracy, OL3 is gradually looking to remove the dependency on Closure Library, not Closure Compiler.