Migrate from templates to Gomponents (#103)
This commit is contained in:
parent
0bf9ab7189
commit
051d032038
104 changed files with 2768 additions and 2824 deletions
35
Makefile
35
Makefile
|
|
@ -1,30 +1,37 @@
|
|||
# Install Ent code-generation module
|
||||
.PHONY: help
|
||||
help: ## Print make targets
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
.PHONY: ent-install
|
||||
ent-install:
|
||||
ent-install: ## Install Ent code-generation module
|
||||
go get entgo.io/ent/cmd/ent
|
||||
|
||||
# Generate Ent code
|
||||
.PHONY: air-install
|
||||
air-install: ## Install air
|
||||
go install github.com/air-verse/air@latest
|
||||
|
||||
.PHONY: ent-gen
|
||||
ent-gen:
|
||||
ent-gen: ## Generate Ent code
|
||||
go generate ./ent
|
||||
|
||||
# Create a new Ent entity
|
||||
.PHONY: ent-new
|
||||
ent-new:
|
||||
ent-new: ## Create a new Ent entity (ie, make ent-new NAME=MyEntity)
|
||||
go run entgo.io/ent/cmd/ent new $(name)
|
||||
|
||||
# Run the application
|
||||
.PHONY: run
|
||||
run:
|
||||
run: ## Run the application
|
||||
clear
|
||||
go run cmd/web/main.go
|
||||
|
||||
# Run all tests
|
||||
.PHONY: test
|
||||
test:
|
||||
go test -count=1 -p 1 ./...
|
||||
.PHONY: watch
|
||||
watch: ## Run the application and watch for changes with air to automatically rebuild
|
||||
clear
|
||||
air
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run all tests
|
||||
go test ./...
|
||||
|
||||
# Check for direct dependency updates
|
||||
.PHONY: check-updates
|
||||
check-updates:
|
||||
check-updates: ## Check for direct dependency updates
|
||||
go list -u -m -f '{{if not .Indirect}}{{.}}{{end}}' all | grep "\["
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue