-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.boot
More file actions
126 lines (102 loc) · 4.16 KB
/
build.boot
File metadata and controls
126 lines (102 loc) · 4.16 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
(set-env!
:source-paths #{"src/cljs"
"src/clj"
"resources/assets"
}
:checkouts '[;[cljsjs/grommet "1.1.0-0"]
[codamic/hellhound "0.12.0-SNAPSHOT"]]
:resource-paths #{"resources/statics"}
;:asset-paths #{}
:dependencies '[[org.clojure/clojure "1.9.0-alpha14"]
;[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229"]
[codamic/hellhound "0.12.0-SNAPSHOT"]
[yogthos/config "0.8"]
[com.andrewmcveigh/cljs-time "0.4.0"]
[codamic/garm-vendor "0.1.0"]
[cljsjs/bootstrap "3.3.6-1"]
[cljsjs/grommet "1.1.0-0"]
[cheshire "5.6.3"]
[clj-http "3.1.0"]
;; HellHound
[adzerk/boot-cljs "1.7.228-2" :scope "test"]
[deraen/boot-less "0.6.0" :scope "test"]
[deraen/boot-sass "0.3.0" :scope "test"]
[binaryage/devtools "0.8.2" :scope "test"]
[adzerk/boot-reload "0.4.13" :scope "test"]
;; Cljs repl dependencies ----------------------------
[adzerk/boot-cljs-repl "0.3.3" :scope "test"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[weasel "0.7.0" :scope "test"]
[org.clojure/tools.nrepl "0.2.12" :scope "test"]
;; ---------------------------------------------------
[org.danielsz/system "0.3.2-SNAPSHOT"]
])
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-reload :refer [reload]]
'[adzerk.boot-cljs-repl :refer [cljs-repl-env start-repl]]
'[deraen.boot-less :refer [less]]
'[deraen.boot-sass :refer [sass]]
'[system.boot :refer [system] :as s]
'[garm.system :refer [dev-system]]
'[hellhound.boot.helpers :refer :all]
'[hellhound.boot.repl :refer [cider]]
'[environ.boot :refer [environ]])
(task-options!
pom {:project 'codamic/garm
:version "0.1.0-SNAPSHOT"
:description "Stock exchange utility belt"
:license {:name "GPLv3" :url "https://www.gnu.org/licenses/gpl.html"}}
jar {:main 'garm.system
:manifest {"Description" "Stock exchange utility belt"
"Url" "http://github.com/Codamic/garm"}}
cljs {:ids #{"application"}
:optimizations :none :source-map true}
;; system {:sys #'dev-system :auto false :files ["src/clj/handler.clj"
;; "src/clj/system.clj"]}
less {:source-map true}
sass {:source-map true})
(deftask dev
[l with-less bool "Use LESS instead of SASS."
p port PORT int "Port to run the web server on."]
(let [port_ (or port 4000)]
(set-env! :source-paths #(conj % "src/js/dev"))
(environ :env {:http-port (str port_)})
(comp
(cider)
(watch)
(if with-less
(less)
(sass))
(system :sys #'dev-system :auto true :files ["handler.clj" "system.clj"])
(cljs-repl-env :ws-host "localhost" :ids #{"application"})
(cljs)
(repl :server true)
(target))))
(deftask prod
"Setup the prod environment."
[]
(environ :env {:http-port "4000"})
identity)
;; (deftask run []
;; (comp (serve)
;; (watch)
;; (cljs-repl)
;; (reload)
;; (build)))
(deftask testing []
(set-env! :source-paths #(conj % "test/cljs"))
identity)
;;; This prevents a name collision WARNING between the test task and
;;; clojure.core/test, a function that nobody really uses or cares
;;; about.
;; (ns-unmap 'boot.user 'test)
;; (deftask test []
;; (comp (testing)
;; (test-cljs :js-env :phantom
;; :exit? true)))
;; (deftask auto-test []
;; (comp (testing)
;; (watch)
;; (test-cljs :js-env :phantom)))