> FWIW there is absolutely no need to ship a production/development version of the code. The Closure Compiler is perfectly capable of minifying any JS source (NOT advanced optimize, just minify).
That's right but for some projects the assumption that .min.js means "minified" is just not true. E.g. React ships with different logging levels enabled based on wether you're including the development or production build. I'm sure there are more projects that include extra debugging stuff that's stripped while packaging. > As a build tool author I don't quite agree with using a naming convention to detect the files (eg. *.inc.js, ...). You could never package more than one file this way since there would be no way to tell the compiler: file Y needs to be added before file B. Very fair point. We haven't actually come across that situation as most libs are distributed as single files but I agree that this might cause problems with libraries that are distributed with multiple files (Thinking of Bootstrap - although that's a whole other beast). — Martin http://martinklepsch.org <http://martinklepsch.org?ref=email> On Tue, Jan 6, 2015 at 11:49 AM, Thomas Heller <[email protected]> wrote: > FWIW there is absolutely no need to ship a production/development version > of the code. The Closure Compiler is perfectly capable of minifying any JS > source (NOT advanced optimize, just minify). > > Therefore the full JS + externs would be enough. > > As a build tool author I don't quite agree with using a naming convention > to detect the files (eg. *.inc.js, ...). You could never package more than > one file this way since there would be no way to tell the compiler: file Y > needs to be added before file B. > > There are some efforts in the Closure Compiler to support AMD, CommonJS, > ES6 modules. I haven't looked closely but we might even be able to > :advanced compile any JS code in the future. Don't know if that works yet > though (or if that even is the goal). > > Regards, > /thomas > > PS: we also need to rethink some of this stuff for HTTP/2 ... but thats a > topic for another day. I believe the goog.module efforts are motivated by > that. > > On Monday, January 5, 2015 6:19:56 PM UTC+1, Martin Klepsch wrote: > > CLJSJS [1] is an effort to package Javascript libraries + their > respective > > extern files and provide tooling to integrate them into your project. > > > > Traditionally interoperability features are a big deal for Clojure. > > In Clojurescript however things are not as straightforward. There are > > no mechanisms to depend on Javascript libraries that work smooth > > accross all optimization modes. CLJSJS aims to change that. > > > > Popular libraries like React, Hammer.js, jQuery and more have already > > been packaged for you and can be depended on via Clojars: > > > > [cljsjs/react "0.12.2-2"] etc. > > > > If you're using the Boot build tool relying on one of those libraries > > is straightforward[2] and even transitive CLJSJS dependencies will "just > work". > > With Leiningen things are more manual, contributions to make > > this easier are very welcome. > > > > You can read more about CLJSJS on the project homepage. > > > > I'm very excited to hear what you think! > > > > [1] http://cljsjs.github.io > > [2] https://github.com/cljsjs/packages#using-a-package > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to a topic in the > Google Groups "ClojureScript" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojurescript/qhFNVEeNCbc/unsubscribe. > To unsubscribe from this group and all its topics, 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.
