homebrew-core/Formula/clojurescript.rb
matteocng 0a199f4319 clojurescript 1.8.40
Closes #385.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-17 19:47:52 +02:00

31 lines
870 B
Ruby

class Clojurescript < Formula
desc "Clojure to JS compiler"
homepage "https://github.com/clojure/clojurescript"
url "https://github.com/clojure/clojurescript/releases/download/r1.8.40/cljs.jar"
version "1.8.40"
sha256 "e2e877e0179cc55ebb8e687a79a8c5ec21fe7245aec3a85d44be04625d19a189"
head "https://github.com/clojure/clojurescript.git"
bottle :unneeded
def install
libexec.install "cljs.jar"
bin.write_jar_script libexec/"cljs.jar", "cljsc"
end
def caveats; <<-EOS.undent
This formula is useful if you need to use the ClojureScript compiler directly.
For a more integrated workflow, Leiningen with lein-cljsbuild is recommended.
EOS
end
test do
(testpath/"t.cljs").write <<-EOF.undent
(ns hello)
(defn ^:export greet [n]
(str "Hello " n))
EOF
system "#{bin}/cljsc", testpath/"t.cljs"
end
end