The lein-cljsbuild plugin even with the repl-listen task option does not seem to me to use an nrepl middleware. The best interactive experience is obtainable by using pieggieback middleware.
Chas (I did not scrupulously read the README - sorry about that) remembered me that piggieback 0.0.5 requires a CLJS version >= 0.0-1835. So, if you use the cljsbuild plugin you need to add a compatible CLJS version to the project dependencies. The only problem that at the moment I have (I'm pretty new with nrepl) is to automate the bREPL session creation from the `lein repl` command. Than I will have the others, but the interactive experience with an nrepl-based brepl is IMHO much core comfortable if compared with repl-listen. Mimmo On Thursday, July 18, 2013 1:45:50 PM UTC+2, Chris Bui wrote: > > Thanks so much! I slept on it and followed your instructions and now > everything works perfectly. > > On Wednesday, July 17, 2013 11:43:38 PM UTC-5, ktsujister wrote: >> >> >> Here's how I did it. >> >> 1. I setup brepl environment with help of below tutorial. >> >> https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-02.md >> >> in short, you'll need (repl/connect "http://localhost:9000/repl") >> somewhere in your clojurescript code. >> >> 2. then open nrepl in emacs(I'm using M-x nrepl-jack-in) >> >> 3. Enter below in your nrepl >> (do >> (require 'cljs.repl.browser) >> (cemerick.piggieback/cljs-repl >> :repl-env >> (doto (cljs.repl.browser/repl-env :port 9000) >> cljs.repl/-setup))) >> >> 4. You need to show the page that has your cljs running on your browser. >> >> 5. test if your nrepl is working correctly by executing below on nrepl. >> (js/alert "I'm ready!") >> >> Hope this helps. >> >> Regards, >> K >> >> >> On Thursday, July 18, 2013 1:03:59 PM UTC+9, Chris Bui wrote: >>> >>> I'm trying to setup an environment for Clojurescript. The problem I'm >>> having is not knowing how to set it up so that I can connect to a >>> Clojurescript Browser REPL from emacs, so I can evaluate forms right from >>> the editor and have it show up in the browser. >>> >>> Things I've tried: >>> >>> I tried using Cemerick's piggieback and piggybacking on nREPL. I don't >>> really know how to configure it from the documentation. I was able to get >>> it to work after figuring out I had to make an index.html file in the root >>> of the project folder. Except the server doesn't serve my assets. >>> >>> I tried setting up inferior-lisp with the bash script from the >>> Clojurescript wiki. However, whenever I try to run the >>> inferior-lisp-program I'm getting "Wrong type argument: stringp, nil". >>> >>> Here's my ideal workflow: >>> >>> I have a project folder/resources/public folder that has my assets and >>> html files. I can start a web server that serves those files somehow, >>> either by ring or using python's simple http server. I'd be able to connect >>> to a REPL from emacs and evaluate forms into it. >>> >>> Thanks in advance. >>> >> -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.