-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
bb.edn
116 lines (84 loc) · 2.91 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{:paths
["src/tasks"]
:tasks
{:requires
([babashka.fs :as fs]
[tasks])
; region lint
lint-deps
(when (fs/modified-since ".clj-kondo/.cache" "deps.edn")
(shell "bash -c" "clj-kondo --copy-configs --dependencies --lint \"$(clojure -Spath -A:provided:dev)\" --parallel"))
lint
{:depends [lint-deps]
:task (shell "clj-kondo --lint src")}
; endregion
; region app
app:css-clean
(fs/delete-if-exists "shells/electron/compiled-css/main.css")
app:css-watch
(shell {:extra-env {"TAILWIND_MODE" "watch"}}
"npx postcss src/css/tailwind.css -o ./shells/electron/compiled-css/main.css --verbose -w")
app:css-release
(shell {:extra-env {"TAILWIND_MODE" "build"
"NODE_ENV" "production"}}
"npx postcss src/css/tailwind.css -o ./shells/electron/compiled-css/main.css --verbose")
app:js-clean
(do
(fs/delete-tree ".shadow-cljs")
(fs/delete-tree "shells/electron/js"))
app:js-deps
(shell {:dir "shells/electron"} "npm install")
app:js-watch
(shell "npx shadow-cljs watch electron-background electron-renderer")
app:js-release
{:depends [app:js-deps]
:task (shell "npx shadow-cljs release electron-background electron-renderer")}
app:clean
{:depends [app:css-clean app:js-clean]}
app:release
{:doc "Release CSS and JS assets"
:depends [app:clean app:js-release app:css-release]}
app:pack-test
{:depends [app:release]
:task (shell {:dir "shells/electron"} "npx electron-builder --dir")}
app:pack
{:depends [app:js-release]
:task (shell {:dir "shells/electron"} "npx electron-builder -mlw")}
-app:dev
{:depends [app:css-watch app:js-watch]}
app:dev
(shell "bb run --parallel -app:dev")
app:launch
{:doc "Open electron app."
:task (shell {:dir "shells/electron"} "npx electron .")}
app:publish
{:doc "Publish a new app version."
:task tasks/release-app}
; endregion
; region embed
embed:css-watch
(shell {:extra-env {"TAILWIND_MODE" "watch"}}
"npx postcss src/css/tailwind.css -o ./shells/embed/compiled-css/main.css --verbose -w")
embed:css-release
(shell {:extra-env {"TAILWIND_MODE" "build"
"NODE_ENV" "production"}}
"npx postcss src/css/tailwind.css -o ./shells/embed/compiled-css/main.css --verbose")
embed:js-watch
(shell "npx shadow-cljs watch embed")
embed:js-release
(shell "npx shadow-cljs release embed")
embed:build-report
{:doc "Generate build report for embed"
:task (do
(shell "npx shadow-cljs run shadow.cljs.build-report embed embed-report.html")
(shell "open embed-report.html"))}
embed:launch
{:doc "Open browser with embed dev."
:task (shell "open http://localhost:8087/embed.html")}
-embed:dev
{:depends [embed:css-watch embed:js-watch]}
embed:dev
{:doc "Start watching builds to develop the embed component."
:task (shell "bb run --parallel -embed:dev")}
; endregion
}}