Fork me on GitHub

@bhauman Regarding using the Cursive REPL, I found this page but it seems like it’s used for figwheel and not figwheel-main. Would the same instructions still apply more or less?


yes its not for figwheel.main


are you using lein?


not at the moment, as I was playing around with the new CLI stuff. I could easily switch though


so I don’t use cursive, but there are two ways to go with a nrepl or a clojure.main REPL


Actually f I were you I’d head over to #cursive and ask, because these things are in flux at the moment.


with the nrepl you will need to make sure it starts with piggieback middleware and with clojure.main you just need to make sure your classpath is correct and after that you need to look at the scripting api to launch figwheel from whichever Clojure REPL you choose


are there any docs on starting an nrepl server with the required middleware? In theory Cursive supports just taking a hostname/port and can take it from there


I’m actually have decent luck so far with the clojure.main REPL. seems to be working with just a few issues:

[Figwheel:WARNING] A "resources/public/index.html" exists but the "resources" directory is not on the classpath
    the default server will not be able to find your index.html
and when sending code from the IDE to the REPL:
cljs.user=> (in-ns '
nil> (defn a-div []
  [:div "I'm a sub div sort of thing"])
#object[ReferenceError ReferenceError: front_end is not defined]


the start command fired up figwheel and a browser to connect to it just fine though


@risinglight I’m thinking you haven’t created a front-end app ns yet?


you would have to say (ns for that to work


and the warning is expected if you haven’t added “resources” to your classpath


you are correct about the ns. Creating it did the trick. In the past the IDE has loaded the file to the REPL creating it automatically but that wasn’t the case this time. I think I will have to dig around the Cursive docs to figure out the “resources” on classpath issue


never mind, it was as simple as adding “resources” to :paths in deps.edn 🙂


I shall spend some more time with the docs… thanks again for all the help!


again, this is amazing cool, esp with the ability to send code directly from the IDE to the browser repl