-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
73 lines (60 loc) · 2.12 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
{:tasks
{:init
(def config
{:tailwind {:input "tailwind.css"
:output "resources/public/css/tailwind.css"}})
:enter
(let [task (current-task)]
(println (format "\033[1;32m[HS-UI]\033[0;32m %s start\033[0m %s" (:name task) (:desc task))))
:leave
(let [task (current-task)]
(println (format "\033[1;32m[HS-UI]\033[0;32m %s end\033[0m" (:name task))))
npm-install
{:desc "Installs all npm dependencies"
:task (shell "npm" "install")}
init
{:desc "Initializes the project"
:task (run 'npm-install)}
deinit
{:desc "Deinitializes the project"
:task (do
(babashka.fs/delete-tree "node_modules")
(babashka.fs/delete-tree "package-lock.json")
(babashka.fs/delete-tree ".cpcache")
(babashka.fs/delete-tree ".shadow-cljs")
(babashka.fs/delete-tree "resources/public/js/storybook")
(babashka.fs/delete-tree "resources/public/js/components")
(babashka.fs/delete-tree (get-in config [:tailwind :output])))}
tailwind-watch
{:desc "Watches for changes in the Tailwind CSS source file and regenerates the output CSS"
:task (shell "npx" "tailwindcss"
"-i" (-> config :tailwind :input)
"-o" (-> config :tailwind :output)
"--watch")}
tailwind-release
{:desc ""
:task (shell "npx" "tailwindcss"
"-i" (-> config :tailwind :input)
"-o" (-> config :tailwind :output))}
shadow-watch
{:desc "Watches Components and Storybook for changes"
:task (do
(future (run 'tailwind-watch))
(clojure "-M:shadow watch components storybook"))}
shadow-release
{:desc ""
:task (clojure "-M:shadow release components storybook")}
story
{:desc "Starts the Storybook development server"
:task (shell "npx" "storybook" "dev" "-p" "5555")}
dev
{:desc "Starts the development environment"
:task (run 'shadow-watch)}
build
{:desc ""
:task (do (run 'shadow-release)
(run 'tailwind-release))}
pages
{:desc ""
:task (do (run 'build)
(shell "npx" "storybook" "build" "-o" "_site"))}}}