ClojureScript开发:从Cordova到React - Native的实践指南
1. ClojureScript在Cordova上的应用
要将ClojureScript应用部署到Android设备,可基于Cordova布局,在项目中插入Boot工具。具体操作步骤如下:
1. 复制资源和源代码文件夹:从之前的温度转换器项目中复制 resources
和 src
文件夹到当前Cordova项目。
2. 编写 build.boot
文件:以下是 build.boot
文件的代码:
(def +version+ "0.1.0")
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:target-path "www"
:dependencies
'[
[adzerk/boot-cljs "1.7.228-2" :scope "test"]
[adzerk/boot-reload "0.4.11" :scope "test"]
[pandeiro/boot-http "0.7.3" :scope "test"]
; clojurescript and reagent
[org.clojure/clojurescript "1.9.494"]
[reagent "0.6.1"]
[re-frame "0.9.0"]
; REPL
[adzerk/b