Trying to make sense of all the Tooling & REPLing (mostly Clojurescript)

113 views
Skip to first unread message

Andy R

unread,
Mar 21, 2015, 3:05:06 PM3/21/15
to clojur...@googlegroups.com
Hi *,

I'm trying to wrap my head around all the tooling+REPL in Clojurescript. I haven't really been able to find a good overview of the currently used tools/plugins.
I find it very tough to understand how everything plays together: REPL, nREPL, Middelware, Weasel, Piggieback, bREPL, CLJS->JS conversion, Emacs, Cider, cider-nrepl, Browser, JVM, Editor.

I don't expect other to just explain everything to me so I did a brain dump of what I've been able figured out:

https://github.com/rauhs/clojurescript/wiki/Clojurescript-Tooling-REPL-overview

I mostly wonder if the section "cljs.repl/repl" is all correct. Also the very last section ("A typical setup") I do some hand waving since I don't really understand how everything is tied together.

This might also help other newcomers to understand how everything plays together (if my write up is mostly correct). I think it would also be helpful to have such a page somewhere as a living document.

I'd love to get corrections (either here or in the wiki) of the things that I misunderstood.

Thanks for reading

Fenton Travers

unread,
Sep 25, 2015, 12:13:34 PM9/25/15
to clojure-tools
For clojurescript, for me, I'm on Emacs, I use figwheel.  I have it running in an inf-clojure buffer.  I have a function in my .emacs with:

(defun figwheel-repl ()
  (interactive)
  (run-clojure "lein figwheel"))

See this post for details:

https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-with-Emacs-Inferior-Clojure-Interaction-Mode

In your list of items:


REPL, nREPL, Middelware, Weasel, Piggieback, bREPL, CLJS->JS conversion, Emacs, Cider, cider-nrepl, Browser, JVM, Editor.

I only think about care about:

REPL (via figwheel)

CLJS -> JS conversion comes about with cljsbuild setup in project.clj.  Some entries I have in that are:


Then just point your browser to:

http://localhost:3449/

On Saturday, March 21, 2015 at 12:05:06 PM UTC-7, Andy R wrote:
(defproject figreag "0.1.0-SNAPSHOT"
 
:description "FIXME: write this!"
 
:url "http://example.com/FIXME"
 
:license {:name "Eclipse Public License"
           
:url "http://www.eclipse.org/legal/epl-v10.html"}

 
:dependencies [[org.clojure/clojure "1.7.0"]
                 
[org.clojure/clojurescript "0.0-3297"]
                 
[figwheel "0.3.6"]
                 
[figwheel-sidecar "0.3.6"]]
 
 
:plugins [[lein-cljsbuild "1.0.5"]
           
[lein-figwheel "0.3.6"]
           
[cider/cider-nrepl "0.10.0-SNAPSHOT"]]

 
:source-paths ["src"]

 
:clean-targets ^{:protect false} ["resources/public/js/compiled"
                                   
"target"]
 
:cljsbuild {
             
:builds [{:id "dev"
                       
:source-paths ["src" "test"]
                       
:figwheel { :on-jsload "figreag.router/on-js-reload" }
                       
:compiler {:main figreag.router
                                   
:asset-path "js/compiled/out"
                                   
:output-to "resources/public/js/compiled/figreag.js"
                                   
:output-dir "resources/public/js/compiled/out"
                                   
:source-map-timestamp true }}
                       
{:test
                       
{:source-paths ["src" "test"]
                         
:compiler {:output-to "resources/test/figreag.js"
                                   
:optimizations :whitespace
                                   
:pretty-print true}
                         
}}
                       
{:id "min"
                       
:source-paths ["src"]
                       
:compiler {:output-to "resources/public/js/compiled/figreag.js"
                                   
:main figreag.router
                                   
:optimizations :advanced
                                   
:pretty-print false}}]}

 
:figwheel {:css-dirs ["resources/public/css"] ;; watch and update CSS
             
:nrepl-port 7888})
 

Then point your browser to http://localhost:3449/

After you run figwheel-repl in emacs.


 
Reply all
Reply to author
Forward
0 new messages