我该如何让clojurescript和lein-cljsbuild使用最新版本的Google Closure而不是去年的版本?我想使用新功能,比如websocket抽象层。
我尝试过制作最新版本的jar包,然后使用lein-localrepo进行安装,但好像没有什么影响。
有什么建议吗?
我尝试过制作最新版本的jar包,然后使用lein-localrepo进行安装,但好像没有什么影响。
有什么建议吗?
(defproject cljsbuild-example-simple "0.3.4"
:description "A simple example of how to use lein-cljsbuild"
:source-paths ["src-clj"]
:dependencies [[org.clojure/clojure "1.5.1"]
[com.google.javascript/closure-compiler "v20131014"]
[org.clojure/clojurescript "0.0-1934"
:exclusions [org.apache.ant/ant
com.google.javascript/closure-compiler]]
[compojure "1.0.4"]
[hiccup "1.0.0"]]
:plugins [[lein-cljsbuild "0.3.4"]
[lein-ring "0.7.0"]]
:cljsbuild {
:builds [{:source-paths ["src-cljs"]
:compiler {:output-to "resources/public/js/main.js"
:optimizations :whitespace
:pretty-print true}}]}
:ring {:handler example.routes/app})
[clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]]
[com.google.javascript/closure-compiler "v20131014"]
[args4j "2.0.16"]
[com.google.code.findbugs/jsr305 "1.3.9"]
[com.google.guava/guava "15.0"]
[com.google.protobuf/protobuf-java "2.4.1"]
[org.json/json "20090211"]
[compojure "1.0.4"]
[clout "1.0.1"]
[org.clojure/core.incubator "0.1.0"]
[org.clojure/tools.macro "0.1.0"]
[ring/ring-core "1.1.0"]
[clj-time "0.3.7"]
[joda-time "2.0"]
[commons-codec "1.6"]
[commons-fileupload "1.2.1"]
[commons-io "2.1"]
[javax.servlet/servlet-api "2.5"]
[hiccup "1.0.0"]
[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1934" :exclusions [[org.apache.ant/ant] [com.google.javascript/closure-compiler]]]
[org.clojure/data.json "0.2.3"]
[org.clojure/google-closure-library "0.0-20130212-95c19e7f0f5f"]
[org.clojure/google-closure-library-third-party "0.0-20130212-95c19e7f0f5f"]
[org.clojure/tools.reader "0.7.9"]
[org.mozilla/rhino "1.7R4"]
[org.clojure/tools.nrepl "0.2.3" :exclusions [[org.clojure/clojure]]]
然后编译它:
$ lein cljsbuild once
Compiling ClojureScript.
Compiling "resources/public/js/main.js" from ["src-cljs"]...
Successfully compiled "resources/public/js/main.js" in 9.181874 seconds.