usr bin env boot set-env source-paths src atom-src dependencies adzerk

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env boot
(set-env!
:source-paths #{"src" "atom-src"}
:dependencies '[[adzerk/boot-cljs "0.0-2629-3" :scope "test"]
[adzerk/boot-cljs-repl "0.1.7" :scope "test"]
[adzerk/boot-reload "0.2.3" :scope "test"]
[pandeiro/boot-http "0.4.2" :scope "test"]
[org.webjars/bootstrap "3.3.1"]
[deraen/boot-less "0.2.0" :scope "test"]
[cljsjs/react "0.12.2-3"]
[cljsjs/boot-cljsjs "0.4.0" :scope "test"]
[rum "0.2.0"]
[datascript "0.7.2"]
[keybind "1.0.0"]])
(task-options! pom
{:project 'switter
:version "0.1.0-SNAPSHOT"})
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[adzerk.boot-reload :refer [reload]]
'[pandeiro.boot-http :refer [serve]]
'[cljsjs.boot-cljsjs :refer [from-cljsjs]]
'[deraen.boot-less :refer [less]])
(deftask atom-dev
"Start atom cljs watcher"
[]
(with-env! {:source-paths #{"src" "atom-src"}
:target "target-atom"}
(comp
(watch)
(speak)
(cljs-repl)
(cljs :source-map true
:optimizations :whitespace
:pretty-print true
:cache-analysis true))))
(deftask ui-dev
"Start ui watcher"
[]
(with-env! {:source-paths #{"src/switter/ui"}
:resource-paths #{"resources/public"}
:target "target-ui"}
(comp (serve :port 3000)
(from-cljsjs :target "public")
(watch)
(speak)
;;(reload :on-jsload 'switter.core/trigger-render)
(cljs-repl)
(cljs :source-map true
:optimizations :none
:unified-mode true)
(less :source-map true))))
#_(deftask dev
"start dev env"
[]
(comp
(atom-dev)
(ui-dev)))