Skip to content

hiredman/nrepl-cljs-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nrepl-cljs-middleware

What is it?

nrepl middleware for compiling clojurescript

nrepl request with `op` of “compiler-cljs” causes `code` to be compiled to javascript, the javascript is returned as the value of `javascript`, wraps code in a function, so evaling the value of `javascript` in js will always result in a function object, invoke it to run your code

use with https://github.com/cemerick/drawbridge/ to get clojurescript compiler with http interface

now if only there was an nrepl client for drawbridge written in clojurescript…

Usage

add the following to project.clj

[nrepl-cljs-middleware "0.0.1"]
;; with drawbridge

(def nrepl-handler (cdb/ring-handler
                    :nrepl-handler
                    (-> (clojure.tools.nrepl.server/default-handler)
                        nrepl.cljs.middleware.compile/compile-cljs)))

Todo

  • needs better exception handling
  • js eval?
  • ast?
  • nrepl.el integration?

License

Copyright (C) 2012 Kevin Downey

Distributed under the Eclipse Public License, the same as Clojure.

About

nrepl middleware providing clojurescript compilation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published