Fork me on GitHub

@lilactown shadow-cljs should be fine with goog.module


I think it was the "vanilla" CLJS compiler that I ran into issues


and I didn't want my lib to be shadow-cljs only 😄


which, I never finished it anyway. If I pick it back up I'll probably rewrite the TS code in CLJS. I thought it was a neat experiment to see if I could get easy interop between TS and CLJS


this is interesting. I wonder if it has any good use-cases in the shadow world?


I struggle a bit with source maps when using closure and ncc together. probably unrelated to the value of this tool but mentioning it in case others have similar challenges


would be useful but I still get "invalid source map" for some maps although they work fine in the browser


same issue and had issues with bigger source maps


shame but good to know 🙂

Pavel KlavĂ­k16:01:36

Hi, what is the easiest way to look for all occurances of all keywords with certain ns in my CLJS code, and to use this list for constructing CSS using Garden? I would like to get hot code reloading for it, so when I modify CLJS code, Garden should recompile as well.


I would try using this tool to search your clojure code with spec:


Oh, and for the file-watching part, you'd just create a script using a file-watching library (like juxt/dirwatch), and then set up your file watching, then call shadow.cljs.devtools.api/watch programatically. Then, instead of running the watch task:

yarn shadow-cljs run dev/watch
Where src/dev.clj has a watch function that does this


Oh and your watch function needs this metadata:

(defn watch
  {:shadow/requires-server true}

Pavel KlavĂ­k20:01:00

Thanks for the link to grasp, haven't seen this before.

Pavel KlavĂ­k20:01:21

This sounds like a possible solution to set everything up on my own, but I am not convinced it is the easiest one. I could imagine using Shadow-cljs hooks which would call this code search on all modified files and dump stuff somewhere where it can be picked by Garden file watcher.

Pavel KlavĂ­k22:01:08

thanks for sharing this, it gives quite a lot of insight