-
Notifications
You must be signed in to change notification settings - Fork 6
/
project.clj
177 lines (177 loc) · 11 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
(defproject storefront "0.1.0-SNAPSHOT"
:description "The front of the store"
:url "https://github.com/Mayvenn/storefront"
:license {:name "All rights reserved"}
:dependencies [[org.clojure/clojure "1.10.0"]
[com.stuartsierra/component "0.3.2"]
[com.cognitect/transit-clj "0.8.313"]
[com.cognitect/transit-cljs "0.8.256"]
[com.launchdarkly/launchdarkly-java-server-sdk "4.11.1"]
[environ "1.1.0"]
[tocsin "0.1.4"]
[tugboat "0.2.2" :exclusions [ring-logging]]
[ring-logging "0.3.8"]
[mayvenn/spice "0.2.6"]
[compojure "1.6.1"]
[noir-exception "0.2.3"]
[ring "1.9.4"]
[ring/ring-json "0.5.1"]
[ring/ring-defaults "0.3.3" :exclusions [[javax.servlet/servlet-api]]]
[ring-jetty-component "0.3.1"]
[ring/ring-jetty-adapter "1.9.4"]
[javax.servlet/javax.servlet-api "3.1.0"]
[org.eclipse.jetty/jetty-server "9.4.42.v20210604"]
[org.eclipse.jetty.websocket/websocket-servlet "9.4.42.v20210604"]
[org.eclipse.jetty.websocket/websocket-server "9.4.42.v20210604"]
[hiccup "1.0.5"]
[cheshire "5.8.0"]
[cljsjs/google-maps "3.18-1"]
[org.clojure/clojurescript "1.10.520"]
[cljsjs/react "16.9.0-0"]
[cljsjs/react-dom "16.9.0-0"]
[cljsjs/react-dom-server "16.9.0-0"]
[cljsjs/react-transition-group "4.2.1-0"]
;; polyfill react 15 methods
[cljsjs/create-react-class "15.5.3-0"]
[org.clojure/core.async "0.3.443"]
[cljs-ajax "0.7.3" :exclusions [org.apache.httpcomponents/httpclient]]
[comb "0.1.1"]
[sablono "0.8.6"]
[bidi "2.1.5"]
[lambdaisland/uri "1.13.95"]
[com.cemerick/url "0.1.1"]
[overtone/at-at "1.2.0"]
[camel-snake-kebab "0.4.0"]
[org.clojure/spec.alpha "0.2.176"]
[meander/epsilon "0.0.650"]
[markdown-to-hiccup "0.6.2"]
[markdown-clj "1.10.6"]]
:repositories [["private" {:url "s3p://mayvenn-dependencies/releases/"}]]
:plugins [[s3-wagon-private "1.3.1"]
[lein-cljsbuild "1.1.7"]
[lein-cljfmt "0.6.4"]]
:main storefront.core
:repl-options {:init-ns user}
:jvm-opts ~(concat
["-Xmx1024m" "-XX:-OmitStackTraceInFastThrow"]
(let [version (System/getProperty "java.version")
[major _minor _patch] (clojure.string/split version #"\.")]
(cond
(#{9 10} (Integer. major)) ["--add-modules" "java.xml.bind"]
:else [])))
:clean-targets ^{:protect false} [:target-path
"resources/public/js/out/"
"resources/public/css/"
"resources/public/cdn"]
:source-paths ["src" "src-cljc" "src-cljs"]
:resource-paths ["resources"]
:aliases {"fig" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]
"fig:pc" ["trampoline" "run" "-m" "figwheel.main" "-pc" "-b" "dev" "-r"]}
:cljsbuild
{:builds
{:release
{:source-paths ["src-cljc" "src-cljs"]
:warning-handlers [cljs.analyzer/default-warning-handler
(fn [warning-type env extra]
(when (warning-type cljs.analyzer/*cljs-warnings*)
(when-let [s (cljs.analyzer/error-message warning-type extra)]
(binding [*out* *err*]
(println (cljs.analyzer/message env s))
(System/exit 1)))))]
:compiler {:output-dir "target/release/js/out"
:asset-path "/js/out" ; our CDN host is defined at startup time, so we're basically ignoring this value
:source-map true
;; Don't forget to update config.clj > define-frontend-modules
;; Don't forget to update dev.cljs.edn
;; Don't forget to update views.clj > js-modules
;; Read: https://clojurescript.org/news/2017-07-10-code-splitting#_technical_description
;; To predict which modules will contain what code
:modules {:cljs-base {:output-to "target/release/js/out/cljs_base.js"}
:ui {:output-to "target/release/js/out/ui.js"
:entries #{storefront.components.ui}}
:homepage {:output-to "target/release/js/out/homepage.js"
:entries #{homepage.core}
:depends-on #{:ui}}
:main {:output-to "target/release/js/out/main.js"
:entries #{storefront.core}
:depends-on #{:ui}}
:dashboard {:output-to "target/release/js/out/dashboard.js"
:entries #{stylist.dashboard}
:depends-on #{:catalog}}
:redeem {:output-to "target/release/js/out/redeem.js"
:entries #{voucher.redeem}
:depends-on #{:catalog}}
:design-system {:output-to "target/release/js/out/design-system.js"
:entries #{design-system.home}
:depends-on #{:dashboard :main :redeem :catalog :checkout}}
:catalog {:output-to "target/release/js/out/catalog.js"
:entries #{catalog.core stylist-profile.stylist-details}
:depends-on #{:ui}}
:checkout {:output-to "target/release/js/out/checkout.js"
:entries #{checkout.core}
:depends-on #{:catalog}}}
;; rename-prefix: for a ~2% gzipped file size tax, prefixes all
;; storefront's minified vars with m_ to avoid naming conflicts
;; with minified code from google tag manager. Any
;; exported function still retains its described name
:rename-prefix "m_"
:closure-defines {goog.DEBUG false}
:infer-externs false
:static-fns true
:fn-invoke-direct true
:parallel-build true
:language-out :es6-strict
:npm-deps false
:install-deps false
:pseudo-names false
:foreign-libs [{:file "src-cljs/storefront/jsQR.js"
:file-min "target/min-js/jsQR.js"
:provides ["jsQR"]}
{:file "src-cljs/storefront/muuri.js"
:file-min "target/min-js/muuri.js"
:provides ["Muuri"]}
{:file "src-cljs/storefront/muuri_react.js"
:file-min "target/min-js/muuri_react.js"
:requires ["Muuri"]
:provides ["MuuriReact"]}
{:file "src-cljs/storefront/bugsnag-2.5.0.js"
:file-min "target/min-js/bugsnag-2.5.0.js"
:provides ["bugsnag"]}]
:externs ["externs/luckyorange.js"
"externs/jsQR.js"
"externs/muuri.js"
"externs/muuri_react.js"
"externs/bugsnag.js"
"externs/browser.js"
"externs/facebook.js"
"externs/google_maps.js"
"externs/kustomer.js"
"externs/quadpay.js"
"externs/riskified.js"
"externs/spreedly.js"
"externs/stringer.js"
"externs/stripe.js"
"externs/uploadcare.js"
"externs/wirewheel_upcp.js"
"externs/calendly.js"
"externs/wistia.js"
"externs/yotpo.js"]
:optimizations :advanced}}}}
:auto-clean false
:profiles {:uberjar {:aot :all}
:test {:plugins [[lein-test-report-junit-xml "0.2.0"]]}
:repl {:dependencies [[cider/piggieback "0.5.2"]
[nrepl "0.8.3"]]}
:dev {:source-paths ["dev/clj"]
:dependencies [[com.bhauman/figwheel-main "0.2.14"]
[com.bhauman/rebel-readline-cljs "0.1.4"]
[org.clojure/tools.reader "1.3.2"]
[org.clojure/tools.namespace "1.0.0"]
[binaryage/devtools "0.9.10"]
[pjstadig/humane-test-output "0.8.1"]
[standalone-test-server "0.7.2"]
[ring/ring-mock "0.3.0"]]
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]
:cljsbuild
{:builds {:dev {:source-paths ["dev/cljs"]}}}}})