簡體   English   中英

在lein-cljsbuild的ClojureScript構建中使用普通的.js文件(Google Closure'd)

[英]Using plain .js files (Google Closure'd) in ClojureScript build with lein-cljsbuild

我想在我的ClojureScript項目中使用一些簡單的.js文件。 我正在使用lein-cljsbuild構建它,而.js文件是標准的Google Closure命名空間,帶有正確的goog.provide聲明。 基本上我想要的是將它們合並到Closure Compiler中的編譯源中。 那可能嗎?

您應該能夠在構建規范中的:compiler key下將Closure-aware JS文件添加到:libs

;; in project.clj
:cljsbuild {:builds [{:source-paths [...]
                      :compiler {:libs ["foo.js"]    ; <- add the libs here
                                 ...}}]}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM