-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbb.edn
29 lines (29 loc) · 1.66 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
{:tasks {:requires ([babashka.fs :as fs]
[babashka.wait :as wait])
clean {:doc "Purge compilation artifacts."
:task (fs/delete-tree "target")}
clobber {:doc "Reset project to pristine state."
:depends [clean]
:task (fs/delete-tree "node_modules")}
init {:doc "Install npm dependencies."
:task (shell "npm install")}
test:browser {:doc "Serve browser test runner and auto-compile on changes."
:task (shell "npx shadow-cljs watch browser-test")}
-test:run {:task (do
(fs/delete-if-exists "target/test/all.js")
(wait/wait-for-path "target/test/all.js")
(shell "npx karma start"))}
-test:compile {:task (shell "npx shadow-cljs watch test")}
-test:watch {:depends [-test:run -test:compile]}
test:watch {:doc "Auto-compile and run headless tests on changes."
:task (run '-test:watch {:parallel true})}
test:once {:doc "Compile and run unit tests."
:task (do
(shell "npx shadow-cljs compile test")
(shell "npx karma start --single-run"))}
release:publish {:doc "Publish latest tagged release to Clojars."
:task (apply clojure "-M:release" *command-line-args*)}
release:version {:doc "Get current release version from tags."
:task (clojure "-M:release version")}
doc:api {:doc "Generate API documenation."
:task (clojure "-X:dev:doc")}}}