|
1 | 1 | (require 'leiningen.core.eval) |
2 | 2 |
|
3 | | -(def http-port 3449) |
4 | | - |
5 | 3 | ;; --------------------------------------------------------------------------------------- |
6 | 4 |
|
7 | 5 | (defproject re-com "lein-git-inject/version" |
|
17 | 15 | [thheller/shadow-cljs "2.28.2" :scope "provided"] |
18 | 16 | [reagent "1.1.0" :scope "provided"] |
19 | 17 | [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"]] |
21 | 20 |
|
22 | 21 | :plugins [[day8/lein-git-inject "0.0.15"] |
23 | | - [lein-shadow "0.4.0"] |
24 | 22 | [com.github.liquidz/antq "RELEASE"] |
25 | 23 | [lein-shell "0.5.0"] |
26 | 24 | [lein-pprint "1.3.2"]] |
|
43 | 41 | :resource-paths ["run/resources"] |
44 | 42 |
|
45 | 43 | :clean-targets ^{:protect false} [:target-path |
46 | | - "shadow-cljs.edn" |
47 | 44 | "node_modules" |
48 | 45 | "run/resources/public/compiled_dev" |
49 | 46 | "run/resources/public/compiled_prod" |
|
57 | 54 | ;; Exclude the demo and compiled files from the output of either 'lein jar' or 'lein install' |
58 | 55 | :jar-exclusions [#"(?:^|\/)re_demo\/" #"(?:^|\/)demo\/" #"(?:^|\/)compiled.*\/" #"html$"] |
59 | 56 |
|
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 | | - |
104 | 57 | :release-tasks [["deploy" "clojars"]] |
105 | 58 |
|
106 | 59 | :shell {:commands {"karma" {:windows ["cmd" "/c" "karma"] |
|
112 | 65 | :aliases {;; *** DEV *** |
113 | 66 | "watch" ["with-profile" "+dev,+demo" "do" |
114 | 67 | ["clean"] |
115 | | - ["shadow" "watch" "demo" "browser-test" "karma-test"]] |
| 68 | + ["shell" "npm" "install"] |
| 69 | + ["shell" "npx" "shadow-cljs" "watch" "demo" "browser-test" "karma-test"]] |
116 | 70 |
|
117 | 71 | ;; *** PROD *** |
118 | 72 | "prod-once" ["with-profile" "+demo,-dev" "do" |
119 | 73 | ["clean"] |
120 | | - ["shadow" "release" "demo"]] |
| 74 | + ["shell" "npm" "install"] |
| 75 | + ["shell" "npx" "shadow-cljs" "release" "demo"]] |
121 | 76 |
|
122 | 77 | "deploy-aws" ["with-profile" "+demo,-dev" "do" |
123 | 78 | ["clean"] |
124 | | - ["shadow" "release" "demo"] |
| 79 | + ["shell" "npm" "install"] |
| 80 | + ["shell" "npx" "shadow-cljs" "release" "demo"] |
125 | 81 | ~["shell" "aws" "s3" "sync" "run/resources/public" "s3://re-demo/" "--acl" "public-read" "--cache-control" "max-age=2592000,public"]] |
126 | 82 |
|
127 | 83 | ;; *** TEST *** |
128 | 84 | "build-report-ci" ["with-profile" "+demo,-dev" "do" |
129 | 85 | ["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"]] |
131 | 88 |
|
132 | 89 | "ci" ["do" |
133 | 90 | ["with-profile" "+dev" "do" |
134 | 91 | ["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"]] |
137 | 95 | ["with-profile" "+demo,-dev" "do" |
138 | 96 | ["clean"] |
139 | | - ["shadow" "release" "demo"]]]}) |
| 97 | + ["shell" "npm" "install"] |
| 98 | + ["shell" "npx" "shadow-cljs" "release" "demo"]]]}) |
0 commit comments