[Discuss] intention on replacing my npm scripts with clj CLI

@thheller

@Jon 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. (edited)

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

I tried. The time was cut from 10s+ to 2s in one of my project with caches for compilation. In many occasions I would release my projects with the server running.

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. (edited)

I would start a watch server and keep it running actually. I think I would rely on the logs of the server to read its status. If it runs in backend, I can’t see the logs.

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 …

That would be nice. My most frequent use case of Clojure REPL is to try macros, or I would just use Lumo. Besides, now it’s 4 keystrokes away to start a Clojure REPL.

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

Bad network. Would you mind adding a processbar?