After I read the link you provided and another page<http://code.google.com/p/closure-compiler/wiki/FAQ#When_using_Advanced_Optimizations,_Closure_Compiler_adds_new_var>, I discovered that wrapping my compiled stuff in an anonymous function keeps Google Closure's output symbols from colliding with other existing stuff such as CodeMirror's minified variables.
That link points out that it's best to have the compiler do the wrapping for you with --output_wrapper. Is there a way to specify this for cljsbuild? lein-cljsbuild issue #117<https://github.com/emezeske/lein-cljsbuild/issues/117>says cljsbuild is just a wrapper for the ClojureScript compiler and if we want it we should open a ticket for ClojureScript. I looked and did not immediately see a ticket or the wrapper option. So maybe I'll open that ticket? By the way, I'm not sure compiling CodeMirror and my stuff in one go is the right approach, because I don't know whether CodeMirror is compatible with Google Closure's advanced compilation. (I see that CodeMirror 1's compression page had Google Closure advanced optimization as an option but it disappeared for CodeMirror 2.) I think doing so would require me to hand-edit CodeMirror to add a goog.provide call. On Friday, October 5, 2012 8:52:09 AM UTC-4, David Nolen wrote: > > > You might find this helpful: > http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html > > I believe you can use the same options you give to ClojureScript compiler > so you should be good. > > David > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en