-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (39 loc) · 844 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
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: setup
setup:
npm install -D tailwindcss
npm install -D @tailwindcss/typography
npm i -D daisyui@latest
npm install
go install github.com/air-verse/air@latest
go get entgo.io/ent/cmd/ent
# Generate Ent code
.PHONY: ent-gen
ent-gen:
go generate ./ent
# Create a new Ent entity
.PHONY: ent-new
ent-new:
go run entgo.io/ent/cmd/ent new $(name)
.PHONY: dev
dev:
clear
air -c .air.toml
.PHONY: dev-css
dev-css:
npx tailwindcss -i tailwind-styles.css -o static/styles.css --postcss --watch
# Run all tests
.PHONY: test
test:
go test -count=1 -p 1 ./...
# Check for direct dependency updates
.PHONY: check-updates
check-updates:
go list -u -m -f '{{if not .Indirect}}{{.}}{{end}}' all | grep "\["
# Run linting
.PHONY: lint
lint:
golangci-lint run
# Run linting and fix
.PHONY: lint-fix
lint-fix:
golangci-lint run --fix