All Projects → bodil → cljs-nashorn

bodil / cljs-nashorn

Licence: other
ClojureScript REPL on Nashorn

Programming Languages

clojure
4091 projects

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].