-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bb.edn
101 lines (83 loc) · 5.07 KB
/
bb.edn
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
{:paths ["src" "resources"]
:deps {aero/aero {:mvn/version "1.1.6"}
clojure-msgpack/clojure-msgpack {:mvn/version "1.2.1"}
com.stuartsierra/component {:mvn/version "1.1.0"}
exoscale/interceptor {:mvn/version "0.1.17"}
metosin/malli {:mvn/version "0.16.4"}
pogonos/pogonos {:mvn/version "0.2.1"}
rewrite-clj/rewrite-clj {:mvn/version "1.1.48"}
org.clj-commons/digest {:mvn/version "1.4.100"}}
:__elin_internal__
{:command {:deps {nrepl/nrepl {:mvn/version "1.3.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}
cider/cider-nrepl {:mvn/version "0.50.2"}}
:middlewares [cider.nrepl/cider-middleware
refactor-nrepl.middleware/wrap-refactor]}}
:tasks
{start-server {:task (shell "bb -m elin.core '{\"server\": {\"host\": \"localhost\", \"port\": 12233}, \"env\": {\"cwd\": \".\"}}'")}
nrepl-server {:doc "Start a REPL for development"
:override-builtin true
:extra-paths ["dev" "test"]
:requires ([elin.dev]
[elin.test-helper])
:task (exec 'elin.task.nrepl/-main)}
lint {:doc "Clj-kondo linting"
:task (shell "clj-kondo --lint src:test")}
format-check {:doc "Check code formats"
:task (shell "npx @chrisoakman/standard-clojure-style check src test")}
format-fix {:doc "Fix code formats"
:task (shell "npx @chrisoakman/standard-clojure-style fix src test")}
test {:doc "Run unit tests"
:extra-paths ["dev" "test"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:requires ([taoensso.timbre :as timbre])
:enter (timbre/set-level! :warn)
:task (exec 'cognitect.test-runner.api/test)
:exec-args {:dirs ["test"]}
:org.babashka/cli {:coerce {:nses [:symbol]
:vars [:symbol]}}}
clj-kondo-emit {:doc "Emit clj-kondo configurations by malli"
:extra-paths ["test"]
:extra-deps {org.clojure/tools.namespace {:mvn/version "1.5.0"}}
:requires ([malli.clj-kondo :as mc]
[clojure.tools.namespace.find :as ctnf]
[clojure.java.io :as io])
:task (do (doseq [ns-sym (concat (ctnf/find-namespaces-in-dir (io/file "src"))
(ctnf/find-namespaces-in-dir (io/file "test")))]
(require ns-sym)
(mc/collect (find-ns ns-sym)))
(mc/emit!))}
generate-test-analysis {:doc "Generate test analysis file by clj-kondo"
:extra-paths ["dev"]
:requires ([elin.task.test-analysis])
:task (exec 'elin.task.test-analysis/-main)}
generate-deps-edn {:doc "Generate deps.edn from bb.edn"
:requires ([clojure.java.io :as io])
:task (do (shell {:out :write :out-file (io/file "deps.edn")} "echo ;; DO NOT EDIT THIS FILE DIRECTLY.")
(shell {:out :append :out-file (io/file "deps.edn")} "echo ;; This file is generated by 'bb deps-edn' command.")
(shell {:out :append :out-file (io/file "deps.edn")} "bb print-deps"))}
generate-vim-help {:doc "Generate vim help files"
:extra-paths ["dev"]
:task (exec 'elin.task.help/-main)}
generate-document-adoc {:doc "Generate document adoc files"
:extra-paths ["dev"]
:task (do (shell "rm -rf doc/pages/generated")
(exec 'elin.task.doc/-main))}
generate-document-html {:doc "Generate document HTMLs"
:depends [generate-document-adoc]
:task (clojure {:dir "doc/pages"}
"-Sdeps '{:paths [\"src\"] :deps {org.asciidoctor/asciidoctorj {:mvn/version \"RELEASE\"}}}' -M -m convert")}
watch-document-html {:doc "Generate document HTMLs"
:depends [generate-document-adoc]
:task (clojure {:dir "doc/pages"}
"-Sdeps '{:paths [\"src\"] :deps {org.asciidoctor/asciidoctorj {:mvn/version \"RELEASE\"} com.nextjournal/beholder {:mvn/version \"RELEASE\"}}}' -M -m watch")}
check-documents {:doc "Check documents"
:extra-paths ["dev"]
:task (exec 'elin.task.check-documents/-main)}
update-changelog {:doc "Update CHANGELOG.adoc"
:task (shell "git cliff -o CHANGELOG.adoc")}
check {:doc "Check all"
:depends [clj-kondo-emit generate-test-analysis generate-deps-edn generate-vim-help
check-documents lint format-check test]}
outdated {:doc "Check outdated dependencies"
:task (clojure "-Sdeps '{:deps {com.github.liquidz/antq {:mvn/version \"RELEASE\"}}}' -M -m antq.core --upgrade --skip=clojure-cli")}}}