Fork me on GitHub
#shadow-cljs
<
2018-12-16
>
lilactown17:12:53

I'm trying to figure out how best to setup my library to be consumed by both shadow-cljs and vanilla cljs projects re: npm deps

lilactown17:12:11

It depends on react

thheller17:12:25

just depend on cljsjs/react

lilactown17:12:22

I was dissuaded from trying to use deps.cljs

lilactown17:12:35

Hmm. So if I need an alpha version of react, I'll probably have to get that onto cljsjs myself

thheller18:12:11

yeah thats pretty much the only way for other cljs tools

thheller18:12:33

for shadow-cljs it would be fine with deps.cljs {:npm-deps {"react" "that-version"}}

lilactown18:12:16

gotcha thanks!

lilactown19:12:23

unrelated question: you were doing some work on a UI for shadow-cljs. I remember seeing a REPL. was this a true, connected-to-my-app REPL?

lilactown19:12:17

actually just realized it’s in the current latest of shadow-cljs, answered my own question: it is! 😄

thheller19:12:03

yeah. needs a lot more work though

lilactown19:12:35

is it talking nREPL to my app?

thheller19:12:19

geez no. nrepl is a horrible protocol to work with 😛

thheller19:12:42

also would be kinda pointless since the app is served by shadow-cljs

thheller19:12:00

connecting to the nrepl server provided by shadow-cljs is an extra step we don't need 😉

lilactown19:12:00

I’m curious how it works then. I’m interested in embedding a CLJS REPL in an app for some dev tooling I’m thinking about… I was worried I would have to setup the self-hosted bootstrapping in any apps that used it tho

lilactown19:12:29

ah OK, looks like it’s talking over a websocket at the shadow-cljs app server using some custom format. it must be running that to shadow-cljs’ machinery for sending code to be evaluated in process

thheller19:12:25

yes that part is the same as nrepl or any other shadow-cljs repl

thheller19:12:44

the app talks to shadow-cljs via ws

thheller19:12:22

cljs-repl is pretty tricky so its not super easy to embed from a library or so