Fork me on GitHub
#figwheel-main
<
2020-11-24
>
Braden Shepherdson22:11:23

I want to have a slick, unified editing experience with nrepl and both my Pedestal server and CLJS app with Figwheel Main. is there a good example out there of how to set that up? for example, it seems messy to run two nrepl sessions on different ports, one for CLJS and one for JVM. (what happens if I eval something in a .cljc file?) is there a lein template that shows this workflow?

dominicm22:11:11

@braden.shepherdson I think you just need to use the scripting api for figwheel. I have some non-lein examples.

dominicm22:11:17

Youe editor decides what to do when eval-ing in a .cljc file.

Braden Shepherdson22:11:36

I don't entirely follow. what would I be scripting? I'm happy with a non-lein example; I'm actually using clj for my project.

dominicm22:11:29

@braden.shepherdson juxt/edge can serve as a demonstration then. This is the scripting api: https://figwheel.org/docs/scripting_api.html

Braden Shepherdson22:11:36

ah, that looks like exactly the kind of thing.

dominicm22:11:24

Essentially you just need to start Figwheel inside your jvm repl. Then you tell your editor how to piggieback into clojurescript (this will depend on your editor)

Braden Shepherdson22:11:01

yep, I've got it working nicely.

Braden Shepherdson22:11:11

thanks for the pointer