-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.boot
More file actions
47 lines (40 loc) · 1.26 KB
/
build.boot
File metadata and controls
47 lines (40 loc) · 1.26 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
(set-env!
:resource-paths #{"src"}
:dependencies '[[org.danielsz/system "0.4.1"]
[environ "1.1.0"]
[boot-environ "1.1.0"]
[ring "1.6.3"]
[ring/ring-defaults "0.3.1"]
[compojure "1.6.0"]
[ring-middleware-format "0.7.2"]
[org.clojure/tools.logging "0.3.1"]
[org.clojure/tools.nrepl "0.2.13"]])
(require
'[environ.boot :refer [environ]]
'[example.systems :refer [dev-system]]
'[system.boot :refer [system run]]
'[system.repl :refer [go reset]])
(deftask dev
"Run a restartable system in the Repl"
[]
(comp
(environ :env {:http-port "3000"})
(watch :verbose true)
(system :sys #'dev-system :auto true :files ["handler.clj" "systems.clj" "html.clj"])
(repl :server true)))
(deftask dev-run
"Run a dev system from the command line"
[]
(comp
(environ :env {:http-port "3000"})
(run :main-namespace "example.core" :arguments [#'dev-system])
(wait)))
(deftask build
"Builds an uberjar of this project that can be run with java -jar"
[]
(comp
(aot :namespace '#{example.core})
(pom :project 'myproject
:version "1.0.0")
(uber)
(jar :main 'example.core)))