-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
125 lines (104 loc) · 2.56 KB
/
Taskfile.yaml
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
117
118
119
120
121
122
123
124
125
version: '3'
vars:
DIRS: src test
dotenv: ['.env.local']
tasks:
# Backend commands
deps:
desc: Install all dev deps
cmds:
- clojure -P -X:dev:test:outdated:shadow:cljs
test:
desc: Run tests
cmds:
- clojure -X:dev:cljs:test
fmt-check:
desc: Check code formatting
cmds:
- cljstyle check --report {{ .DIRS }}
fmt:
desc: Fix code formatting
cmds:
- cljstyle fix --report {{ .DIRS }}
lint-init:
desc: Linting project's classpath
cmds:
- clj-kondo --parallel --dependencies --copy-configs --lint {{ .DIRS }}
vars:
DIRS:
sh: clojure -Spath
lint:
desc: Linting project's code
cmds:
- clj-kondo --parallel --lint {{ .DIRS }}
outdated-check:
desc: Check outdated deps versions
cmds:
- clojure -M:outdated {{ .CLI_ARGS }}
outdated:
desc: Upgrade outdated Clojure deps versions
cmds:
- task: outdated-check
vars: { CLI_ARGS: '--upgrade --force' }
check:
desc: Run lint, fmt and tests. Intended to use locally
cmds:
- task: lint
- task: fmt
- task: test
repl:
desc: Run built-in Clojure repl
cmds:
- clojure -A:dev:cljs:test
# Frontend commands
shadow:
desc: Run shadow-cljs commands
internal: true
cmds:
- clojure -M:dev:cljs:shadow {{ .CLI_ARGS }}
js-watch:
desc: Run shadow-cljs commands to build frontend in watch mode
internal: true
cmds:
- task: shadow
vars: { CLI_ARGS: 'watch app'}
css:
desc: Build css in dev mode
internal: true
vars:
OUTPUT_FILE: '{{ .OUTPUT_FILE | default "output.css" }}'
cmds:
- npx tailwindcss -i ./resources/public/css/input.css -o ./resources/public/css/{{.OUTPUT_FILE}} {{ .CLI_ARGS }}
css-watch:
desc: Build css in watch mode
internal: true
cmds:
- task: css
vars: { CLI_ARGS: '--watch' }
css-prod:
desc: Build css in prod mode
cmds:
- task: css
vars:
OUTPUT_FILE: output-prod.css
CLI_ARGS: '--minify'
ui:
desc: Build js and css in watch mode for local development
deps: [css-watch, js-watch]
# Local docker compose commands
up:
desc: Run docker services for local development
cmds:
- docker compose up -d db-local
migrations:
desc: Manage db migrations
cmds:
- clojure -X:migrations {{ .CLI_ARGS }}
# Production build
build:
desc: Build uberjar
cmds:
- task: css-prod
- task: shadow
vars: { CLI_ARGS: 'release app' }
- clojure -T:build build