Fork me on GitHub

things are different on this side in ClojureScript. when I was using CoffeeScript, it compiles to JavaScript and everything runs in JavaScript, most of the tools are fast(except for Webpack), we just start processes and kill processes like we did in Unix. That was mentally very easy.


I still can't fit into Java world, to found Clojure starts so slowly, and ClojureScript compilation takes so much time. Again I know the author of BuckleScript, who put emphasis on performance in building his compiler.


since it's reality that compilation takes time, I would eventually accept that fact, and change my scripts to reduce the cost in time.


since there's cli release with a decent documentation, I would like to take a spin and see if that works in my case: replacing my npm scripts.


clj command takes about 2s to run in my machine, that's acceptable. And it's much better than Boot visually.


shadow-cljs takes long time to start too. It's reasonable to start a compiler with so much time, but not fast enough for scripts.


you see, quick startup might not be significant for your cases, but it matters when someone does want to get result very quickly, like for beginners when they are learning Clojure or exploring new features. Or even for people like us, writing ClojureScript in the fractional time during job, I need to switch quickly..


plus, I think maintaining my projects with on languages lows the mental barrier. so just trying clj to see if there's any good ideas.


how much time doe it take to yarn install shadow-cljs on your side?


I offen use lumo when I writing simple script XD


@jiyinyiyong so my “solution” to this is just having a server running. just do a comparison. a) time yarn your-scripts b) run yarn shadow-cljs server, in another terminal time yarn your scripts. The difference should be substantial when the server is running since you only pay for startup once.


server management itself is a bit annoying at the moment but I’m working on improving that


so there might be a shadow-cljs start|stop|restart at some point which starts a background server so you could modify your scripts to first call start, then do all the rest, then call stop.


alternate option is to run do everything using clojure, but I do understand the desire to use npm scripts.


besides that I can make shadow-cljs clj-run start as fast as clj, it is slow since it wants to provide easy access to shadow-cljs itself. as soon as you are going to use anything you are going to pay for that startup time again. UNLESS you are using the server instance …


the server instance just needs to be easier and all the problems are solved IMHO


installing shadow-cljs takes about 20sec for me with the new AOT enabled, less than 5sec without


I can’t remember… is there a way to specify :compiler-options for :release? I’d like to set :devcards true but only for dev


yeah, {:dev {:compiler-options {:devcards true}}}


I am getting warnings when running shadow-cljs release app from com.cognitect/transit-cljs


version 2.0.122 of shadow-cljs and "0.8.243" of transit-cljs (the latest versions currently)