-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
122 lines (99 loc) · 2.44 KB
/
Taskfile.yml
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
version: '3'
dotenv: [.env]
tasks:
default:
desc: Display all available tasks.
cmds:
- task: list
list:
desc: List all tasks.
cmds:
- task -l
install:
desc: Initialize the project.
cmds:
- task: install:bun
- task: install:modules
- task: install:tools
- task: install:golint
gen:
desc: Generate Templ and TailwindCSS files.
cmds:
- bun run fmt
- bun run build
- task: generate-templ
generate-templ:
desc: Generate Templ files.
cmds:
- templ generate
dev:
desc: Run the dev server.
cmds:
- task --parallel dev:templ dev:air dev:assets dev:sync_assets
dev:assets:
desc: Run TailwindCSS And Esbuild build in watch mode.
cmds:
- bun run dev
dev:air:
desc: Run the dev server with air.
cmds:
- air -c .air.toml
dev:templ:
desc: Run the dev server with templ.
cmds:
- templ generate --watch --proxy="http://localhost:8080" --open-browser=false
dev:sync_assets: air -c .air_proxy.toml
build:
desc: Build production Go binary and assets.
cmds:
- task: gen
- go build -o bin/app ./main.go
- chmod +x bin/app
dev-caddy:
desc: Run Caddy server For WildCard SubDomain For Local Development.
cmds:
- caddy run --config ./scripts/Caddyfile.dev
run:
desc: Run the Go binary.
cmds:
- ./bin/app
install:bun:
desc: Install dependencies.
cmds:
- bun install
install:golint:
desc: Install golint.
cmds:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
install:modules:
desc: Download Go modules.
cmds:
- go mod download
install:tools:
desc: Install tools.
cmds:
- awk -F'"' '/_/ {print $2}' tools.go | xargs -tI % go install %
tidy:
desc: Tidy go.sum.
cmds:
- go mod tidy
nil-away: nilaway -exclude-pkgs="github.com/labstack/echo,github.com/a-h/templ,github.com/cosmtrek/air,github.com/nedpals/supabase-go,github.com/apple/pkl-go" ./...
lint:
desc: Uses golangci-lint
cmds:
- golangci-lint run
fmt:
desc: Reformat code
cmds:
- bun run fmt
- go fmt ./...
check:
desc: Run all checks.
cmds:
- task: fmt
- task: tidy
- task: lint
- task: nil-away
- task: vuln
- task: sql-check-files
- task: sql-check-structure