-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.clj
34 lines (26 loc) · 839 Bytes
/
build.clj
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
(ns build
(:require [shadow.cljs.devtools.api :as shadow]
[clojure.tools.build.api :as b]))
(def version "0.0.1-SNAPSHOT")
(def class-dir "target/classes")
(def uber-file "target/app.jar")
(def basis (delay
(b/create-basis {:project "deps.edn"
:aliases [:backend]})))
(defn clean [_]
(b/delete {:path "target"}))
(defn uberjar [_]
(clean nil)
(b/copy-dir {:src-dirs ["src/clj" "src/cljc" "resources"]
:target-dir class-dir})
;; Build frontend:
(shadow/release :app)
#_
(b/compile-clj {:basis @basis
:ns-compile '[backend.main]
:class-dir class-dir})
(b/uber {:class-dir class-dir
:uber-file uber-file
;; :main 'backend.main
:basis @basis})
(println "Uberjar:" uber-file))