ClojureScript REPL on Nashorn
Clojure
Switch branches/tags
Nothing to show
Latest commit 01eaa33 Jul 28, 2014 @bodil Merge pull request #3 from danskarda/fix-load-stream
Two fixes for goog-require

README.md

cljs-nashorn

Provides a ClojureScript REPL running on Oracle's Nashorn Javascript engine.

Requirements

In order to run the Nashorn engine, you need a recent Java 8 runtime. This code was originally developed using version 1.8.0-ea-b75. It would be advisable to ensure you have at least this version installed.

Getting Java 8

Java 8 packages for various operating systems can be downloaded from Oracle's JDK8 download site.

Installing Java 8 on Ubuntu

At the time of writing, this is the easiest way to install a sufficiently recent Java 8 runtime on the Ubuntu GNU/Linux OS:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Leiningen Plugin

To setup the Leiningen plugin, add this to your project.clj or ~/.lein/profiles.clj:

:plugins [[org.bodil/lein-nashorn "0.1.2"]]

Then, start the REPL like this:

$ lein trampoline nasrepl

In-Project Usage

Add the following dependency to your project.clj:

[org.bodil/cljs-nashorn "0.1.2"]

To launch the REPL the hard way, run lein repl and enter the following:

(require '[cljs.repl :as repl] '[cljs.repl.nashorn :as nashorn])
(repl/repl (nashorn/repl-env))

License

Copyright © 2013 Bodil Stokke.

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