-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.clj
150 lines (123 loc) · 9.79 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
(require 'leiningen.core.eval)
(def http-port 3449)
;; ---------------------------------------------------------------------------------------
(defproject org.clojars.bnmcgn/re-com-tailwind "2.18.0" #_"lein-git-inject/version"
:description "Tailwind version of the Re-com component library"
:url "https://github.com/bnmcgn/re-com-tailwind.git"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.10.3" :scope "provided"]
[org.clojure/clojurescript "1.10.879" :scope "provided"
:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]]
[thheller/shadow-cljs "2.15.2" :scope "provided"]
[reagent "1.1.0" :scope "provided"]
[org.clojars.bnmcgn/re-com "2.18.0-CUSTOM"]]
:plugins [[day8/lein-git-inject "0.0.15"]
[lein-shadow "0.4.0"]
[com.github.liquidz/antq "RELEASE"]
[lein-shell "0.5.0"]
[lein-pprint "1.3.2"]
[lein-tailwind "0.1.2"]]
:middleware [leiningen.git-inject/middleware]
:antq {}
:profiles {:dev {:source-paths ["dev-src"]
:dependencies [[clj-stacktrace "0.2.8"]
[binaryage/devtools "1.0.3"]]
:plugins [[org.clojure/data.json "2.4.0"]]}
:demo {:dependencies [[alandipert/storage-atom "2.0.1"]
[com.cognitect/transit-cljs "0.8.264"] ;; Overrides version in storage-atom which prevents compiler warnings about uuid? and boolean? being replaced
[clj-commons/secretary "1.2.4"]]}}
:source-paths ["src"]
:test-paths ["test"]
:resource-paths ["run/resources"]
:clean-targets ^{:protect false} [:target-path
"shadow-cljs.edn"
"node_modules"
"run/resources/public/compiled_dev"
"run/resources/public/compiled_prod"
"run/resources/public/compiled_test"]
:deploy-repositories [["clojars" {:sign-releases false
:url "https://clojars.org/repo"
:username :env/CLOJARS_USERNAME
:password :env/CLOJARS_TOKEN}]]
;; Exclude the demo and compiled files from the output of either 'lein jar' or 'lein install'
:jar-exclusions [#"(?:^|\/)re_demo\/" #"(?:^|\/)demo\/" #"(?:^|\/)compiled.*\/" #"html$"]
:shadow-cljs {:nrepl {:port 7777}
:builds {:demo {:target :browser
:modules {:demo {:init-fn re-demo.core/mount-demo
:preloads [day8.app.dev-preload]}}
:compiler-options {:closure-defines {re-com.config/version "lein-git-inject/version"
;; For production builds of the demo app, set goog.DEBUG
;; to be true so that the debugging demo page works as expected.
goog.DEBUG true
re-com.config/force-include-args-desc? true}
;; For production builds of the demo app, keep the component name
;; symbols for display in validation error logging.
:pseudo-names true
:externs ["externs/detect-element-resize-externs.js"]}
:dev {:asset-path "/compiled_dev/demo"
:output-dir "run/resources/public/compiled_dev/demo"
:compiler-options {:closure-defines {;; When re-com produces validation errors it tries to provide links
;; to source code. These links require that you provide the root URL
;; to the ClojureScript compiler output with source maps.
re-com.config/root-url-for-compiler-output "http://localhost:3449/compiled_dev/demo/cljs-runtime/"}
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}}
:release {:output-dir "run/resources/public/compiled_prod/demo"
:compiler-options {:closure-defines {;; For production builds, such as the demo website, there is no source
;; code to link to in validation errors or component stacks, so we set
;; it to an empty string to cause links to not be displayed at all.
re-com.config/root-url-for-compiler-output ""}}}
:devtools {:http-port ~http-port
:http-root "run/resources/public"
:push-state/index "index_dev.html"}}
:browser-test {:target :browser-test
:ns-regexp "-test$"
:test-dir "run/resources/public/compiled_test/demo"
:compiler-options {:closure-defines {re-com.config/version "lein-git-inject/version"}
:externs ["externs/detect-element-resize-externs.js"]
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}
:devtools {:http-port 8021
:http-root "run/resources/public/compiled_test/demo"
:preloads [day8.app.dev-preload]}}
:karma-test {:target :karma
:ns-regexp ".*-test$"
:output-to "target/karma/test.js"
:compiler-options {:pretty-print true
:closure-defines {re-com.config/version "lein-git-inject/version"}
:externs ["externs/detect-element-resize-externs.js"]}}}}
:release-tasks [["deploy" "clojars"]]
:shell {:commands {"karma" {:windows ["cmd" "/c" "karma"]
:default-command "karma"}
"open" {:windows ["cmd" "/c" "start"]
:macosx "open"
:linux "xdg-open"}}}
:aliases {;; *** DEV ***
"watch" ["with-profile" "+dev,+demo" "do"
["clean"]
["shadow" "watch" "demo" "browser-test" "karma-test"]]
;; *** PROD ***
"prod-once" ["with-profile" "+demo,-dev" "do"
["clean"]
["shadow" "release" "demo"]]
"deploy-aws" ["with-profile" "+demo,-dev" "do"
["clean"]
["shadow" "release" "demo"]
~["shell" "aws" "s3" "sync" "run/resources/public" "s3://re-demo/" "--acl" "public-read" "--cache-control" "max-age=2592000,public"]]
;; *** TEST ***
"build-report-ci" ["with-profile" "+demo,-dev" "do"
["clean"]
["shadow" "run" "shadow.cljs.build-report" "demo" "target/build-report.html"]]
"ci" ["do"
["with-profile" "+dev" "do"
["clean"]
["shadow" "compile" "karma-test"]
["shell" "karma" "start" "--single-run" "--reporters" "junit,dots"]]
["with-profile" "+demo,-dev" "do"
["clean"]
["shadow" "release" "demo"]]]}
:tailwind {:tailwind-dir "."
:output-dir "run/resources/public/assets/css"
:tailwind-config "tailwind.config.js" ;; tailwind.config.js is the default value
:styles [{:src "demo.src.css"
:dst "demo.css"}]})