Boot task to compile a ClojureScript function and evaluate in Node.js
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/adamrenklint
test/adamrenklint
.gitignore
CHANGELOG.md
LICENSE
README.md
boot.properties
build.boot
circle.yml

README.md

boot-eval-cljs

Boot task to compile a ClojureScript function and evaluate in Node.js

Clojars Project CircleCI

[adamrenklint/boot-eval-cljs "1.2.1"] ;; latest release

Usage

Add boot-eval-cljs to your build.boot dependencies and require the eval-cljs task:

(set-env! :dependencies '[[adamrenklint/boot-eval-cljs "1.2.1"]])
(require '[adamrenklint.boot-eval-cljs :refer [eval-cljs]])

Now you can use the task from the command line. Assuming print-hello-world is a function in the foo.bar namespace, just run the task with the -f option:

> boot eval-cljs -f foo.bar/print-hello-world

Or use the eval-cljs task as a building block when composing other tasks:

(deftask dev []
  (comp (watch)
        (eval-cljs :fn 'foo.bar/print-hello-world
                   :compiler-options {:verbose true})))

Options

-f, --fn FN                  sym  Symbol for function to evaluate
-c, --compiler-options OPTS  edn  Options to pass to the ClojureScript compiler

License

Copyright (c) 2017 Adam Renklint

Distributed under the MIT license