-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (59 loc) · 1.96 KB
/
Copy pathMakefile
File metadata and controls
82 lines (59 loc) · 1.96 KB
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
.PHONY: build run templ notify-templ-proxy tailwind minify-tailwind build-inject-tw build-echo run-build run-vite gen-envs build-gen-envs build-gen-manifest gen-manifest docker-build docker-run
#To be used for development only and with the templ proxy
-include .env.dev
# Fail immediately on any command error
SHELL := /bin/sh -e
# Suppress the "Entering/Leaving directory" messages
MAKEFLAGS += --no-print-directory
build-echo:
@go build -o ./tmp/main .
build-gen-envs:
@go build -o generate-envs/generate-envs generate-envs/generate-envs.go
gen-envs:
@./generate-envs/generate-envs
build-gen-manifest:
@go build -o generate-manifest/generate-manifest generate-manifest/generate-manifest.go
gen-manifest:
@generate-manifest/generate-manifest
build:
$(MAKE) build-inject-tw
$(MAKE) build-gen-manifest
$(MAKE) build-gen-envs
$(MAKE) gen-envs
$(MAKE) minify-tailwind
$(MAKE) inject-tw
@npm run build
$(MAKE) gen-manifest
@templ generate
$(MAKE) build-echo
docker-build:
$(MAKE) build
docker-run:
@docker build -t myapp .
@docker run --rm -it -p 8080:8080 \
myapp
run-build:
@make build
@ENV_FILE=.env.prod tmp/main
build-inject-tw:
@go build -o inject-tailwind/inject-tailwind inject-tailwind/inject-tailwind.go
inject-tw:
@inject-tailwind/inject-tailwind
templ:
@templ generate --watch --proxy=http://localhost:$(APP_PORT) --proxyport=$(TEMPL_PROXY_PORT) --open-browser=false --proxybind="0.0.0.0"
notify-templ-proxy:
@templ generate --notify-proxy --proxyport=$(TEMPL_PROXY_PORT)
# watch-tailwind:
# @npx @tailwindcss/cli -i ./tailwind.css -o ./static/assets/css/output-tw.css --watch[=always]
tailwind:
@npx @tailwindcss/cli -i ./tailwind.css -o ./static/assets/css/output-tw.css
minify-tailwind:
@npx @tailwindcss/cli -i ./tailwind.css -o ./static/assets/css/output-tw.css --minify
run-vite:
@npm run dev
run:
@make templ & sleep 1
@$(MAKE) build-inject-tw
@$(MAKE) build-gen-manifest
@$(MAKE) run-vite & sleep 1
@ENV_FILE=.env.dev air