-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
100 lines (85 loc) · 2.56 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
version: "3"
env:
STATIC_DIR: "web/static"
tasks:
# The `build:` tasks below are used together for "production" builds of your project
build:templ:
env:
TEMPL_EXPERIMENT: rawgo
cmds:
- go run github.com/a-h/templ/cmd/[email protected] generate -v
build:styles:
cmds:
- pnpx tailwindcss -c tailwind.config.js -i web/styles/styles.css -o $STATIC_DIR/index.css
build:esbuild:
cmds:
- pnpx esbuild web/libs/datastar/index.ts --bundle --outdir=$STATIC_DIR --external:@starfederation/datastar
build:lit-html:
cmds:
- pnpm -r --filter=lit-html build
build:
cmds:
- go build -o bin/main .
deps:
- build:styles
- build:templ
- build:lit-html
- build:esbuild
parallel: true
# Use this task to debug your project with the delve debugger
debug:
cmds:
- go run github.com/go-delve/delve/cmd/[email protected] exec ./bin/main
deps:
- build
# The `live:` tasks below are used together for "dev" builds, and will hot-reload your entire project when there are code changes
live:templ:
env:
TEMPL_EXPERIMENT: rawgo
cmds:
- go run github.com/a-h/templ/cmd/[email protected] generate --watch --proxy="http://localhost:8080" --open-browser=false -v
live:styles:
cmds:
- pnpx tailwindcss -c tailwind.config.js -i web/styles/styles.css -o $STATIC_DIR/index.css --watch
live:esbuild:
cmds:
- pnpx esbuild web/libs/datastar/index.ts --sourcemap --bundle --outdir=$STATIC_DIR --watch
live:lit-html:
cmds:
- pnpm -r --filter=lit-html build:dev
live:server:
cmds:
- |
go run github.com/air-verse/[email protected] \
--build.cmd "go build -tags dev -o tmp/bin/main" \
--build.bin "tmp/bin/main" \
--build.delay "20" \
--build.exclude_dir "node_modules,data,public" \
--build.include_ext "go,mjs" \
--build.include_dir "routes,handlers,web,content" \
--build.stop_on_error "false" \
--misc.clean_on_exit true
live:reload:
cmds:
- |
go run github.com/air-verse/[email protected] \
--build.cmd "go run github.com/a-h/templ/cmd/[email protected] generate --notify-proxy" \
--build.bin "true" \
--build.delay "100" \
--build.exclude_dir "" \
--build.include_dir "$STATIC_DIR" \
--build.include_ext "mjs,js,css"
live:
deps:
- live:templ
- live:server
- live:styles
- live:lit-html
- live:esbuild
- live:reload
parallel: true
run:
cmds:
- ./bin/main
deps:
- build