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