Fork me on GitHub
#shadow-cljs
<
2024-03-03
>
geraldodev13:03:39

Hi, I'm looking for a vite configuration to compile jsx into a format that shadow-cljs can consume. the objective is to be able to use Javascript version of shadcn-ui https://ui.shadcn.com/docs/cli.

thheller13:03:42

I don't know any vite options, so cannot help there. as far as shadow-cljs is concerned you just need to generate JS files, any common format will do. just needs to be JS, so no jsx or TS

👍 1
frankitox18:03:00

Hi! I've been using Conjure for a while now to REPL into shadow-cljs. The Conjure command ends up calling shadow.cljs.devtools.api/nrepl-select, which works great. But I'd like to choose between different runtimes of a build. How could I accomplish this?

thheller18:03:21

you call (shadow.cljs.devtools.api/repl :the-build-id {:runtime-id <the-id-you-want>})

thheller18:03:35

instead of nrepl-select

thheller18:03:04

technically conjure could query shadow-cljs and ask for the runtimes and let you select, but I don't think it supports that

frankitox19:03:02

Awesome, I completely missed repl

frankitox19:03:17

You know how could I, from Clojure, evaluate some cljs code in certain runtime and return it? I'd like to add a little menu for choosing runtimes based on something like js/window.location.href

thheller19:03:18

there is shadow.cljs.devtools.api/cljs-eval to do quick evals

thheller19:03:36

repl-runtimes also gives you a list of known runtimes

thheller19:03:58

so I guess you could create a util function to do all that?

frankitox19:03:11

Nice, cljs-eval also takes a runtime-id in opts. Yep, I think I have all the pieces now, thanks!!