Feel free to open an enhancement ticket in JIRA w/ patch. Thanks! David
On Thu, Jan 2, 2014 at 8:24 AM, Thomas Heller <[email protected]> wrote: > Howdy, > > I wrote a build library https://github.com/thheller/shadow-build which > replaces cljs.closure and I'd like the see some of the stuff I did flow > back into core cljs. > > I wanted to start discussing some of the stuff I did since I feel the > current situation is "bad" for ClojureScript in general and some of > cljs.closure hurts cljs.analyzer/compiler which in turn hurts shadow-build. > > Pain Point 1) :optimizations :none vs any other > > Right now you have to have seperate HTML includes based on how you built > your project. Anything but :none just includes one js file but :none has do > 3 things. > > 1) include goog/base.js > 2) include compiled/cljs.js (which is just the goog/deps.js basically) > 3) goog.require whatever namespaces you want to use. > > That is not only totally confusing for newbies but also completely > unnecessary. I solved this in shadow-build by shortcutting what closure > optimize would do. > > Generate a file including goog/base.js, the goog deps definitions and then > a bunch of goog.requires. > > For a sample experience: > > git clone https://github.com/thheller/todo-cljs.git > cd todo-cljs > lein run -m build/dev > open public/index.html > > you may edit src/cljs/todo-cljs/app.cljs for auto recompiles while lein is > running. > > see the generated public/assets/cljs/app.js > > or for advanced output do: > lein run -m build/production > > In both cases the index.html does not care wether we are working with > optimized output, it just works (with source maps too). > > IMHO this is a huge improvement over the current situation but I'm > obviously biased. > > > Cheers, > /thomas > > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
