CLJSJS在 ClojureScript 中使用 JavaScript 库
CLJSJS 为 ClojureScript 开发者提供简单的方法来使用 JavaScript 库。
使用方法:
;; in your build.boot file: (set-env! :source-paths #{"src"} :dependencies '[[adzerk/boot-cljs "0.0-2629-1" :scope "test"] [cljsjs/boot-cljsjs "0.3.1" :scope "test"] [cljsjs/react "0.12.2-2"] [reagent "0.4.3"]] (require '[adzerk.boot-cljs :refer [cljs]] '[cljsjs.boot-cljsjs :refer [from-cljsjs]]) (deftask build-dev [] (comp (from-cljsjs :profile :development) (cljs :optimizations :none))) (deftask build-prod [] (comp (from-cljsjs :profile :production) (cljs :optimizations :advanced)))
评论