-
Notifications
You must be signed in to change notification settings - Fork 151
/
Copy pathproject.clj
76 lines (76 loc) · 3.53 KB
/
project.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
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
(defproject cljsbuild-example-advanced "2.0.0-SNAPSHOT"
:description "An advanced example of how to use lein-cljsbuild"
:source-paths ["src-clj" "src-cljc"]
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.597"
:exclusions [org.apache.ant/ant]]
[compojure "1.6.2"]
[hiccup "1.0.5"]]
:plugins [[lein-cljsbuild "1.1.8"]
[lein-ring "0.12.5"]]
:cljsbuild {
; Configure the REPL support; see the README.md file for more details.
:repl-listen-port 9000
:repl-launch-commands
; Launch command for connecting the page of choice to the REPL.
; Only works if the page at URL automatically connects to the REPL,
; like http://localhost:3000/repl-demo does.
; $ lein trampoline cljsbuild repl-launch firefox <URL>
{"firefox" ["firefox"
:stdout ".repl-firefox-out"
:stderr ".repl-firefox-err"]
; Launch command for interacting with your ClojureScript at a REPL,
; without browsing to the app (a static HTML file is used).
; $ lein trampoline cljsbuild repl-launch firefox-naked
"firefox-naked" ["firefox"
"resources/private/html/naked.html"
:stdout ".repl-firefox-naked-out"
:stderr ".repl-firefox-naked-err"]
; This is similar to "firefox" except it uses PhantomJS.
; $ lein trampoline cljsbuild repl-launch phantom <URL>
"phantom" ["phantomjs"
"phantom/repl.js"
:stdout ".repl-phantom-out"
:stderr ".repl-phantom-err"]
; This is similar to "firefox-naked" except it uses PhantomJS.
; $ lein trampoline cljsbuild repl-launch phantom-naked
"phantom-naked" ["phantomjs"
"phantom/repl.js"
"resources/private/html/naked.html"
:stdout ".repl-phantom-naked-out"
:stderr ".repl-phantom-naked-err"]}
:test-commands
; Test command for running the unit tests in "test-cljs" (see below).
; $ lein cljsbuild test
{"unit" ["phantomjs"
"phantom/unit-test.js"
"resources/private/html/unit-test.html"]}
:builds {
; This build has the lowest level of optimizations, so it is
; useful when debugging the app.
:dev
{:source-paths ["src-cljs" "src-cljc"]
:jar true
:compiler {:output-to "resources/public/js/main-debug.js"
:optimizations :whitespace
:pretty-print true}}
; This build has the highest level of optimizations, so it is
; efficient when running the app in production.
:prod
{:source-paths ["src-cljs" "src-cljc"]
:compiler {:output-to "resources/public/js/main.js"
:optimizations :advanced
:pretty-print false}}
; This build is for the ClojureScript unit tests that will
; be run via PhantomJS. See the phantom/unit-test.js file
; for details on how it's run.
:test
{:source-paths ["src-cljs" "src-cljc" "test-cljs"]
:compiler {:output-to "resources/private/js/unit-test.js"
:optimizations :whitespace
:pretty-print true}}}}
; Clean JS directories
:clean-targets ^{:protect false} ["resources/private/js"
"resources/public/js"
:target-path]
:ring {:handler example.routes/app})