On Fri, Oct 5, 2012 at 2:37 PM, Andrew <ache...@gmail.com> wrote: > 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. >
You don't need to do that. That's what the :foreign-libs option is for which is described at the end of blog post. 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