homebrew-core/Formula/clojurescript.rb
Tomasz Pajor d91a73a3f2 clojurescript 1.7.228
Closes Homebrew/homebrew#48353.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-01-22 12:30:21 +00:00

31 lines
872 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.7.228/cljs.jar"
version "1.7.228"
sha256 "c6cb68becc82dbcd3956a361d574abe7202f7b61cb8bd9d4ea31805a5910dc11"
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