Files: 1c6860950766a4374f50d28c62707f3897061a41 / build.boot
2101 bytesRaw
1 | (set-env! |
2 | :source-paths #{"sass" "src"} |
3 | :resource-paths #{"resources"} |
4 | :dependencies '[[adzerk/boot-cljs "1.7.48-3" :scope "test"] |
5 | [org.clojure/clojurescript "1.7.107"] |
6 | [adzerk/boot-cljs-repl "0.1.10-SNAPSHOT" :scope "test"] |
7 | [adzerk/boot-reload "0.3.2-SNAPSHOT" :scope "test"] |
8 | [com.cemerick/piggieback "0.2.1" :scope "test"] |
9 | [weasel "0.7.0" :scope "test"] |
10 | [org.clojure/tools.nrepl "0.2.12" :scope "test"] |
11 | [reagent "0.5.1"] |
12 | [mathias/boot-sassc "0.1.1" :scope "test"] |
13 | [secretary "1.2.3"]]) |
14 | |
15 | (require |
16 | '[adzerk.boot-cljs :refer [cljs]] |
17 | '[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]] |
18 | '[adzerk.boot-reload :refer [reload]] |
19 | '[mathias.boot-sassc :refer [sass]]) |
20 | |
21 | (deftask prod-build [] |
22 | (comp (cljs :ids #{"main"} |
23 | :optimizations :simple) |
24 | (cljs :ids #{"renderer"} |
25 | :optimizations :advanced) |
26 | (sass :output-dir "css"))) |
27 | |
28 | (deftask dev-build [] |
29 | (comp ;; Audio feedback about warnings etc. ======================= |
30 | ;; (speak) |
31 | ;; Inject REPL and reloading code into renderer build ======= |
32 | (cljs-repl :ids #{"renderer"}) |
33 | (reload :ids #{"renderer"} |
34 | :on-jsload 'app.renderer/init) |
35 | ;; Compile renderer ========================================= |
36 | (cljs :ids #{"renderer"}) |
37 | ;; Compile JS for main process ============================== |
38 | ;; path.resolve(".") which is used in CLJS's node shim |
39 | ;; returns the directory `electron` was invoked in and |
40 | ;; not the directory our main.js file is in. |
41 | ;; Because of this we need to override the compilers `:asset-path option` |
42 | ;; See http://dev.clojure.org/jira/browse/CLJS-1444 for details. |
43 | (cljs :ids #{"main"} |
44 | :compiler-options {:asset-path "target/main.out" |
45 | :closure-defines {'app.main/dev? true}}) |
46 | (sass :output-dir "target/css"))) |
47 |
Built with git-ssb-web