-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
50 lines (39 loc) · 1.31 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
{:tasks
{:requires ([babashka.fs :as fs])
format
{:doc "Format the project."
:task (shell "bb scripts/format.clj")}
dev
{:doc "Watch the site cljs, tests, and styles in parallel."
:task (run '-dev {:parallel true})}
-dev
{:depends [watch-cljs watch-styles]}
build
{:doc "Build the project for release"
:depends [build-cljs build-styles]}
watch-cljs
{:doc "Launch a dev and test server for live development"
:task (shell "npx" "shadow-cljs" "watch" "app" "browser-test")}
watch-styles
{:doc "Build the Sass styles."
:task (shell "npx" "sass" "--watch" "--no-source-map"
"sass/styles.scss:public/css/styles.css")}
build-cljs
{:doc "Compile the cljs for release."
:task (shell "npx" "shadow-cljs" "release" "app" )}
build-styles
{:doc "Build the Sass styles."
:task (shell "npx" "sass" "--no-source-map"
"sass/styles.scss:public/css/styles.css")}
test
{:doc "Runs all unit tests."
:depends [-build-node-tests]
:task (shell "node" "out/node/node_tests.js")}
clean
{:doc "Clean up generated directories."
:task (do
(println "Removing generated test files.")
(fs/delete-tree "out"))}
-build-node-tests
{:doc "Compile the tests to a node script."
:task (shell "npx" "shadow-cljs" "compile" "node-test")}}}