-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbb.edn
27 lines (27 loc) · 1.68 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
{:tasks {build {:doc "Build uberjar"
;; FIXME: Consider if it would be better to handle Cljs build in separate classpath
:task (clojure "-T:shadow-cljs:frontend:backend:build uberjar")}
user-repl {:doc "Start user configured nREPL process"
:task (if-let [cmd (:repl-command (read-string (slurp ".user.edn")))]
(apply shell cmd)
(do (println "Missing :repl-command in .user.edn")
(System/exit 1)))}
outdated {:doc "Check depdendencies"
:task (clojure "-M:outdated")}
lint {:doc "Lint"
:task (shell "clj-kondo --lint src")}
init-lint {:doc "Initialize clj-kondo cache and copy lib configs"
:task (shell "sh -c" "clj-kondo --copy-configs --lint $(clj -Spath -A:backend:frontend)")}
test {:doc "Run backend unit tests"
:task (clojure "-M:backend:test")}
test-browser {:doc "Run cljs unit tests in a local browser"
:task (shell "npm run test-browser")}
test-karma {:doc "Build and run cljs unit tests for/with Karma"
:task (shell "npm run test-karma")}
-clean-svgs {:tasks (shell "rm target/gen/svg/* src/js/icons/*")}
-svgr {:depends [-clean-svgs]
:doc "Generate React component JSX files for svg files"
:task (shell "npx @svgr/cli --out-dir target/gen/svg -- src/svg")}
icons {:doc "Generate React component JS files for svg files"
:depends [-svgr]
:task (shell "npx babel target/gen/svg --out-dir src/js/icons")}}}