-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (24 loc) · 852 Bytes
/
Makefile
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
.PHONY: dev-server dev-tailwind dev-templ dev build-server build-tailwind build-templ build
#-----------------------------------------------------
# DEV
#-----------------------------------------------------
dev:
@make -j dev-tailwind dev-templ dev-server
dev-tailwind:
@make ARGS="--watch" build-tailwind
dev-templ:
@templ generate --watch
dev-server:
@onchange -k -i '**/*.go' '**/*.html' 'views/public/**/*' -- go run ./cmd/gotth-top
#-----------------------------------------------------
# BUILD
#-----------------------------------------------------
build:
@make build-tailwind build-templ build-server
build-tailwind:
@npx tailwindcss -m -i ./tailwind.css -o ./views/public/styles.css $(ARGS)
build-templ:
@templ generate
build-server:
@go build -ldflags="-s -w" -o bin/gotth-top ./cmd/gotth-top/main.go
.DEFAULT_GOAL := build