chore: initialize repo skeleton with Makefile and lint config

This commit is contained in:
2026-04-28 12:33:46 +08:00
commit 1d38ce90bb
10 changed files with 105 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
.PHONY: help dev build test test-unit lint sqlc migrate fmt clean
help:
@echo "Targets: dev / build / test / test-unit / lint / sqlc / migrate / fmt / clean"
dev:
go run ./cmd/server
build:
cd web && pnpm install && pnpm build
go build -o bin/server ./cmd/server
test:
go test -race -count=1 ./...
test-unit:
go test -race -count=1 -short ./...
lint:
golangci-lint run ./...
sqlc:
sqlc generate
migrate:
go run ./cmd/server migrate up
fmt:
gofmt -s -w .
cd web && pnpm format
clean:
rm -rf bin dist web/dist coverage.out coverage.html