Skip to content

Commit 2b83eec

Browse files
committed
Remove lein-shadow
1 parent 06f69ba commit 2b83eec

File tree

3 files changed

+64
-57
lines changed

3 files changed

+64
-57
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ compiled*/
1313
misc/
1414
/node_modules/
1515
/.shadow-cljs/
16-
/shadow-cljs.edn
1716
/.clj-kondo/
1817
/.lsp/
1918
.*

project.clj

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
(require 'leiningen.core.eval)
22

3-
(def http-port 3449)
4-
53
;; ---------------------------------------------------------------------------------------
64

75
(defproject re-com "lein-git-inject/version"
@@ -17,10 +15,10 @@
1715
[thheller/shadow-cljs "2.28.2" :scope "provided"]
1816
[reagent "1.1.0" :scope "provided"]
1917
[org.clojure/core.async "1.3.618"]
20-
[com.andrewmcveigh/cljs-time "0.5.2"]]
18+
[com.andrewmcveigh/cljs-time "0.5.2"]
19+
[day8/shadow-git-inject "0.0.5"]]
2120

2221
:plugins [[day8/lein-git-inject "0.0.15"]
23-
[lein-shadow "0.4.0"]
2422
[com.github.liquidz/antq "RELEASE"]
2523
[lein-shell "0.5.0"]
2624
[lein-pprint "1.3.2"]]
@@ -43,7 +41,6 @@
4341
:resource-paths ["run/resources"]
4442

4543
:clean-targets ^{:protect false} [:target-path
46-
"shadow-cljs.edn"
4744
"node_modules"
4845
"run/resources/public/compiled_dev"
4946
"run/resources/public/compiled_prod"
@@ -57,50 +54,6 @@
5754
;; Exclude the demo and compiled files from the output of either 'lein jar' or 'lein install'
5855
:jar-exclusions [#"(?:^|\/)re_demo\/" #"(?:^|\/)demo\/" #"(?:^|\/)compiled.*\/" #"html$"]
5956

60-
:shadow-cljs {:nrepl {:port 7777}
61-
62-
:builds {:demo {:target :browser
63-
:modules {:demo {:init-fn re-demo.core/mount-demo}}
64-
:compiler-options {:closure-defines {re-com.config/version "lein-git-inject/version"
65-
;; For production builds of the demo app, set goog.DEBUG
66-
;; to be true so that the debugging demo page works as expected.
67-
goog.DEBUG true
68-
re-com.config/force-include-args-desc? true}
69-
;; For production builds of the demo app, keep the component name
70-
;; symbols for display in validation error logging.
71-
:pseudo-names true
72-
:externs ["externs/detect-element-resize-externs.js"]}
73-
:dev {:asset-path "/compiled_dev/demo"
74-
:output-dir "run/resources/public/compiled_dev/demo"
75-
:compiler-options {:closure-defines {;; When re-com produces validation errors it tries to provide links
76-
;; to source code. These links require that you provide the root URL
77-
;; to the ClojureScript compiler output with source maps.
78-
re-com.config/root-url-for-compiler-output "http://localhost:3449/compiled_dev/demo/cljs-runtime/"}
79-
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}}
80-
:release {:output-dir "run/resources/public/compiled_prod/demo"
81-
:compiler-options {:closure-defines {;; For production builds, such as the demo website, there is no source
82-
;; code to link to in validation errors or component stacks, so we set
83-
;; it to an empty string to cause links to not be displayed at all.
84-
re-com.config/root-url-for-compiler-output ""}}}
85-
:devtools {:http-port ~http-port
86-
:http-root "run/resources/public"
87-
:push-state/index "index_dev.html"}}
88-
89-
:browser-test {:target :browser-test
90-
:ns-regexp "-test$"
91-
:test-dir "run/resources/public/compiled_test/demo"
92-
:compiler-options {:closure-defines {re-com.config/version "lein-git-inject/version"}
93-
:externs ["externs/detect-element-resize-externs.js"]
94-
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}
95-
:devtools {:http-port 8021
96-
:http-root "run/resources/public/compiled_test/demo"}}
97-
:karma-test {:target :karma
98-
:ns-regexp ".*-test$"
99-
:output-to "target/karma/test.js"
100-
:compiler-options {:pretty-print true
101-
:closure-defines {re-com.config/version "lein-git-inject/version"}
102-
:externs ["externs/detect-element-resize-externs.js"]}}}}
103-
10457
:release-tasks [["deploy" "clojars"]]
10558

10659
:shell {:commands {"karma" {:windows ["cmd" "/c" "karma"]
@@ -112,28 +65,34 @@
11265
:aliases {;; *** DEV ***
11366
"watch" ["with-profile" "+dev,+demo" "do"
11467
["clean"]
115-
["shadow" "watch" "demo" "browser-test" "karma-test"]]
68+
["shell" "npm" "install"]
69+
["shell" "npx" "shadow-cljs" "watch" "demo" "browser-test" "karma-test"]]
11670

11771
;; *** PROD ***
11872
"prod-once" ["with-profile" "+demo,-dev" "do"
11973
["clean"]
120-
["shadow" "release" "demo"]]
74+
["shell" "npm" "install"]
75+
["shell" "npx" "shadow-cljs" "release" "demo"]]
12176

12277
"deploy-aws" ["with-profile" "+demo,-dev" "do"
12378
["clean"]
124-
["shadow" "release" "demo"]
79+
["shell" "npm" "install"]
80+
["shell" "npx" "shadow-cljs" "release" "demo"]
12581
~["shell" "aws" "s3" "sync" "run/resources/public" "s3://re-demo/" "--acl" "public-read" "--cache-control" "max-age=2592000,public"]]
12682

12783
;; *** TEST ***
12884
"build-report-ci" ["with-profile" "+demo,-dev" "do"
12985
["clean"]
130-
["shadow" "run" "shadow.cljs.build-report" "demo" "target/build-report.html"]]
86+
["shell" "npm" "install"]
87+
["shell" "npx" "shadow-cljs" "clj-run" "shadow.cljs.build-report" "demo" "target/build-report.html"]]
13188

13289
"ci" ["do"
13390
["with-profile" "+dev" "do"
13491
["clean"]
135-
["shadow" "compile" "karma-test"]
136-
["shell" "karma" "start" "--single-run" "--reporters" "junit,dots"]]
92+
["shell" "npm" "install"]
93+
["shell" "npx" "shadow-cljs" "compile" "karma-test"]
94+
["shell" "npx" "karma" "start" "--single-run" "--reporters" "junit,dots"]]
13795
["with-profile" "+demo,-dev" "do"
13896
["clean"]
139-
["shadow" "release" "demo"]]]})
97+
["shell" "npm" "install"]
98+
["shell" "npx" "shadow-cljs" "release" "demo"]]]})

shadow-cljs.edn

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{:lein true
2+
:nrepl {:port 7777}
3+
4+
:builds {:demo
5+
{:target :browser
6+
:modules {:demo {:init-fn re-demo.core/mount-demo}}
7+
:build-hooks [(shadow-git-inject.core/hook)]
8+
:compiler-options {:closure-defines {re-com.config/version :shadow-git-inject/version
9+
;; For production builds of the demo app, set goog.DEBUG
10+
;; to be true so that the debugging demo page works as expected.
11+
goog.DEBUG true
12+
re-com.config/force-include-args-desc? true}
13+
;; For production builds of the demo app, keep the component name
14+
;; symbols for display in validation error logging.
15+
:pseudo-names true
16+
:externs ["externs/detect-element-resize-externs.js"]}
17+
:dev {:asset-path "/compiled_dev/demo"
18+
:output-dir "run/resources/public/compiled_dev/demo"
19+
:compiler-options
20+
{:closure-defines {;; When re-com produces validation errors it tries to provide links
21+
;; to source code. These links require that you provide the root URL
22+
;; to the ClojureScript compiler output with source maps.
23+
re-com.config/root-url-for-compiler-output
24+
"http://localhost:3449/compiled_dev/demo/cljs-runtime/"}
25+
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}}
26+
:release {:output-dir "run/resources/public/compiled_prod/demo"
27+
:compiler-options {:closure-defines {;; For production builds, such as the demo website, there is no source
28+
;; code to link to in validation errors or component stacks, so we set
29+
;; it to an empty string to cause links to not be displayed at all.
30+
re-com.config/root-url-for-compiler-output ""}}}
31+
:devtools {:http-port 3449
32+
:http-root "run/resources/public"
33+
:push-state/index "index_dev.html"
34+
:preloads [hashp.core]}}
35+
36+
:browser-test {:target :browser-test
37+
:ns-regexp "-test$"
38+
:test-dir "run/resources/public/compiled_test/demo"
39+
:compiler-options {:closure-defines {re-com.config/version :shadow-git-inject/version}
40+
:externs ["externs/detect-element-resize-externs.js"]
41+
:external-config {:devtools/config {:features-to-install [:formatters :hints]}}}
42+
:devtools {:http-port 8021
43+
:http-root "run/resources/public/compiled_test/demo"}}
44+
:karma-test {:target :karma
45+
:ns-regexp ".*-test$"
46+
:output-to "target/karma/test.js"
47+
:compiler-options {:pretty-print true
48+
:closure-defines {re-com.config/version :shadow-git-inject/version}
49+
:externs ["externs/detect-element-resize-externs.js"]}}}}

0 commit comments

Comments
 (0)