forked from gothinkster/realworld-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.clj
116 lines (102 loc) · 7.71 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
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
(defproject realworld "0.1.0-SNAPSHOT"
:description "My Cool Project"
:license {:name "MIT" :url "https://opensource.org/licenses/MIT"}
:min-lein-version "2.7.0"
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.238"]
[fulcrologic/fulcro "2.5.0"]
; Only required if you use server
[http-kit "2.2.0"]
[ring/ring-core "1.6.3" :exclusions [commons-codec]]
[bk/ring-gzip "0.2.1"]
[bidi "2.1.3"]
; only required if you want to use this for tests
[fulcrologic/fulcro-spec "2.1.0-1" :scope "test" :exclusions [fulcrologic/fulcro]]]
:uberjar-name "realworld.jar"
:source-paths ["src/main"]
:test-paths ["src/test"]
:clean-targets ^{:protect false} ["target" "resources/public/js" "resources/private"]
; Notes on production build:
; To limit possible dev config interference with production builds
; Use `lein with-profile production cljsbuild once production`
:cljsbuild {:builds [{:id "production"
:source-paths ["src/main"]
:jar true
:compiler {:asset-path "js/prod"
:main realworld.client-main
:optimizations :advanced
:source-map "resources/public/js/realworld.js.map"
:output-dir "resources/public/js/prod"
:output-to "resources/public/js/realworld.js"}}]}
:profiles {:uberjar {:main realworld.server-main
:aot :all
:jar-exclusions [#"public/js/prod" #"com/google.*js$"]
:prep-tasks ["clean" ["clean"]
"compile" ["with-profile" "production" "cljsbuild" "once" "production"]]}
:production {}
:dev {:source-paths ["src/dev" "src/main" "src/test" "src/cards"]
:jvm-opts ["-XX:-OmitStackTraceInFastThrow" "-client" "-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1"
"-Xmx1g" "-XX:+UseConcMarkSweepGC" "-XX:+CMSClassUnloadingEnabled" "-Xverify:none"]
:doo {:build "automated-tests"
:paths {:karma "node_modules/karma/bin/karma"}}
:figwheel {:css-dirs ["resources/public/css"]}
:test-refresh {:report fulcro-spec.reporters.terminal/fulcro-report
:with-repl true
:changes-only true}
:cljsbuild {:builds
[{:id "dev"
:figwheel {:on-jsload "cljs.user/mount"}
:source-paths ["src/dev" "src/main"]
:compiler {:asset-path "js/dev"
:main cljs.user
:optimizations :none
:output-dir "resources/public/js/dev"
:output-to "resources/public/js/realworld.js"
:preloads [devtools.preload fulcro.inspect.preload]
:source-map-timestamp true}}
{:id "i18n" ;for gettext string extraction
:source-paths ["src/main"]
:compiler {:asset-path "i18n"
:main realworld.client-main
:optimizations :whitespace
:output-dir "target/i18n"
:output-to "target/i18n.js"}}
{:id "test"
:source-paths ["src/test" "src/main"]
:figwheel {:on-jsload "realworld.client-test-main/client-tests"}
:compiler {:asset-path "js/test"
:main realworld.client-test-main
:optimizations :none
:output-dir "resources/public/js/test"
:output-to "resources/public/js/test/test.js"
:preloads [devtools.preload]}}
{:id "automated-tests"
:source-paths ["src/test" "src/main"]
:compiler {:asset-path "js/ci"
:main realworld.CI-runner
:optimizations :none
:output-dir "resources/private/js/ci"
:output-to "resources/private/js/unit-tests.js"}}
{:id "cards"
:figwheel {:devcards true}
:source-paths ["src/main" "src/cards"]
:compiler {:asset-path "js/cards"
:main realworld.cards
:optimizations :none
:output-dir "resources/public/js/cards"
:output-to "resources/public/js/cards.js"
:preloads [devtools.preload]
:source-map-timestamp true}}]}
:plugins [[lein-cljsbuild "1.1.7"]
[lein-doo "0.1.10"]
[com.jakemccrary/lein-test-refresh "0.21.1"]]
:dependencies [[binaryage/devtools "0.9.10"]
[fulcrologic/fulcro-inspect "2.0.1" :exclusions [fulcrologic/fulcro-css]]
[org.clojure/tools.namespace "0.3.0-alpha4"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.2"]
[lein-doo "0.1.10" :scope "test"]
[figwheel-sidecar "0.5.15" :exclusions [org.clojure/tools.reader]]
[devcards "0.2.4" :exclusions [cljsjs/react cljsjs/react-dom]]]
:repl-options {:init-ns user
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}})