figwheel-main

figwheel-main http://figwheel.org
2020-11-24T22:07:23.131900Z

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?

dominicm 2020-11-24T22:09:11.132Z

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

dominicm 2020-11-24T22:09:17.132100Z

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

2020-11-24T22:13:36.133300Z

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.

dominicm 2020-11-24T22:21:29.134800Z

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

2020-11-24T22:23:36.136100Z

ah, that looks like exactly the kind of thing.

dominicm 2020-11-24T22:24:24.137400Z

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)

2020-11-24T22:42:01.137600Z

yep, I've got it working nicely.

2020-11-24T22:42:11.137800Z

thanks for the pointer