2013-08-18 21:08:25 +00:00
|
|
|
class Clojurescript < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Clojure to JS compiler"
|
2014-06-21 20:22:10 +00:00
|
|
|
homepage "https://github.com/clojure/clojurescript"
|
2015-10-15 21:29:33 +00:00
|
|
|
url "https://github.com/clojure/clojurescript/releases/download/r1.7.145/cljs.jar"
|
|
|
|
version "1.7.145"
|
|
|
|
sha256 "67e33f4e68459d4772f912a658230df5b3d78996d072b34bb9080c337da7bcbb"
|
2014-06-21 20:22:10 +00:00
|
|
|
head "https://github.com/clojure/clojurescript.git"
|
2013-08-18 21:08:25 +00:00
|
|
|
|
2015-10-23 09:13:28 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2013-08-18 21:08:25 +00:00
|
|
|
def install
|
2015-08-10 04:37:14 +00:00
|
|
|
libexec.install "cljs.jar"
|
|
|
|
bin.write_jar_script libexec/"cljs.jar", "cljsc"
|
2013-08-18 21:08:25 +00:00
|
|
|
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
|
2014-12-15 22:57:10 +00:00
|
|
|
(testpath/"t.cljs").write <<-EOF.undent
|
|
|
|
(ns hello)
|
|
|
|
(defn ^:export greet [n]
|
|
|
|
(str "Hello " n))
|
|
|
|
EOF
|
|
|
|
|
|
|
|
system "#{bin}/cljsc", testpath/"t.cljs"
|
2013-08-18 21:08:25 +00:00
|
|
|
end
|
|
|
|
end
|