-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.clj
117 lines (96 loc) · 5.96 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
(defproject org.pinkgorilla/gorilla-ui "0.2.38"
:description "Reagent components for data visualisation."
:url "https://github.com/pink-gorilla/gorilla-ui"
:license {:name "MIT"}
:deploy-repositories [["releases" {:url "https://clojars.org/repo"
:username :env/release_username
:password :env/release_password
:sign-releases false}]]
:min-lein-version "2.9.4" ; nrepl 0.7.0
:prep-tasks ["css"
;"compile" - aot
]
:release-tasks [["vcs" "assert-committed"]
["bump-version" "release"]
["vcs" "commit" "Release %s"]
["vcs" "tag" "v" "--no-sign"]
["deploy"]
["bump-version"]
["vcs" "commit" "Begin %s"]
["vcs" "push"]]
:source-paths ["src"] ; "test"
;:test-paths ["test"]
:target-path "target/jar"
:resource-paths ["resources" ; not from npm
"target/webly" ; bundle
"target/node_modules"] ; css png resources from npm modules
:clean-targets ^{:protect false} [:target-path
[:demo :builds :app :compiler :output-dir]
[:demo :builds :app :compiler :output-to]]
:dependencies [; gorilla-ui is a cljs project, so in here are cljs dependencies
;[org.clojure/clojurescript "1.10.773"]
[thi.ng/strf "0.2.2"
:exclusions [org.clojure/clojurescript]]
;[com.taoensso/timbre "4.10.0"] ; clojurescript logging awb99: this fucks up kernel-cljs-shadowdeps
[com.lucasbradstreet/cljs-uuid-utils "1.0.2"] ;; awb99: in encoding, and clj/cljs proof
[org.pinkgorilla/pinkie "0.2.11"]]
:profiles {:test {:source-paths ["src" "test"]
:test-paths ["test"]}
:demo {:dependencies [ [fipp "0.6.23"] ; edn pretty printing
]
:resource-paths ["profiles/demo/resources"]
:source-paths ["src"
"profiles/demo/src"
"profiles/embed/src"
"test"]}
:dev {:dependencies [[org.clojure/clojure "1.10.3"]
; shadow-cljs MAY NOT be a dependency in lein deps :tree -> if so, bundeler will fail because shadow contains core.async which is not compatible with self hosted clojurescript
[org.pinkgorilla/webly "0.2.6"] ; brings shadow-cljs
[clj-kondo "2021.03.31"]]
:plugins [[lein-cljfmt "0.6.6"]
[lein-cloverage "1.1.2"]
[lein-shell "0.5.0"]
[lein-ancient "0.6.15"]]
:aliases {"clj-kondo"
["run" "-m" "clj-kondo.main"]
"bump-version" ^{:doc "Increases project.clj version number (used by CI)."}
["change" "version" "leiningen.release/bump-version"]}
:cloverage {:codecov? true ; https://github.com/codecov/example-clojure
;; In case we want to exclude stuff
;; :ns-exclude-regex [#".*util.instrument"]
;; :test-ns-regex [#"^((?!debug-integration-test).)*$$"]
}
;; TODO : Make cljfmt really nice : https://devhub.io/repos/bbatsov-cljfmt
:cljfmt {:indents {as-> [[:inner 0]]
with-debug-bindings [[:inner 0]]
merge-meta [[:inner 0]]
try-if-let [[:block 1]]}}}}
:aliases {"clean" ^{:doc "Cleans build artefacts."}
["shell" "./scripts/clean.sh"]
"css" ^{:doc "Copies certain npm package dependecies"}
["shell" "./scripts/copy_res.sh"]
;"build-shadow-ci" ["run" "-m" "shadow.cljs.devtools.cli" "compile" ":demo"] ; :ci
;"shadow-watch-demo" ["run" "-m" "shadow.cljs.devtools.cli" "watch" ":demo"]
;; TEST
"build-test" ^{:doc "Builds Bundle. Gets executed automatically before unit tests."}
["with-profile" "+test" "run" "-m" "shadow.cljs.devtools.cli" "compile" "ci"]
"test-run" ^{:doc "Runs unit tests. Does not build the bundle first.."}
["shell" "./node_modules/karma/bin/karma" "start" "--single-run"]
; "test-js" ^{:doc "Test compiled JavaScript."}
; ["shell" "npm" "run" "test"]
"test-js" ^{:doc "Run Unit Tests. Will compile bundle first."}
["do" "build-test" ["test-run"]]
;; SHADOW - APP
"shadow-demo" ^{:doc "Runs UI components via webserver."}
["with-profile" "+demo" "run" "-m" "shadow.cljs.devtools.cli" "watch" "webly"]
"embed" ^{:doc "Runs UI embedding via webserver."}
["with-profile" "+demo" "run" "-m" "shadow.cljs.devtools.cli" "watch" "embed"]
; APP
"build-dev" ^{:doc "compiles bundle via webly"}
["with-profile" "+demo" "run" "-m" "webly.build-cli" "compile" "+demo" "demo.app/handler" "demo.app"]
"build-prod" ^{:doc "compiles bundle via webly"}
["with-profile" "+demo" "run" "-m" "webly.build-cli" "release" "+demo" "demo.app/handler" "demo.app"]
"run-web" ^{:doc "runs compiles bundle on shadow dev server"}
["with-profile" "+demo" "run" "-m" "demo.app" "run"]
"demo" ^{:doc "Runs UI components via webserver."}
["with-profile" "+demo" "run" "-m" "demo.app" "watch"]})