homebrew-core/Formula/clojurescript.rb
Jerzerak 6ae383199a clojurescript 1.9.76
Closes #2128.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-18 23:48:39 -07: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.9.76/cljs.jar"
version "1.9.76"
sha256 "1080efe82d4b6dadb020dccfb967f41454ad8eb28712c2af73c709216ff31e08"
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