Skip to content

Commit dbd009d

Browse files
committed
refactor(Makefile): reorganize targets and improve documentation
1 parent 9aa6224 commit dbd009d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,29 @@ endef
7474
# Targets
7575
# ==============================================================================
7676

77-
## Install:
77+
## Dependencies:
7878
.PHONY: install/wasm
7979
install/wasm: ## Install Go dependencies
8080
go mod download -x
8181
go mod verify
8282

83+
.PHONY: install/tools
84+
install/tools: export GOOS =
85+
install/tools: export GOARCH =
86+
install/tools: ## Install Go tools
87+
go install tool
88+
8389
.PHONY: install/www
8490
install/www: ## Install GUI dependencies
8591
yarn install
8692

8793
.PHONY: install
8894
install: install/wasm install/www ## Install dependencies
8995

90-
## Update:
9196
.PHONY: update/wasm
9297
update/wasm: ## Update Go dependencies
93-
go get -u -v -tags=tools ./...
94-
go mod tidy -v
95-
go mod download -x
98+
go get -u -v ./...
99+
go mod tidy
96100
go mod verify
97101

98102
.PHONY: update/www
@@ -102,7 +106,7 @@ update/www: ## Update GUI dependencies
102106
.PHONY: update
103107
update: update/wasm update/www ## Update dependencies
104108

105-
## Generate:
109+
## Generators:
106110
.PHONY: generate/wasm
107111
generate/wasm: export GOOS =
108112
generate/wasm: export GOARCH =
@@ -116,7 +120,7 @@ generate/www: ## Generate code from GUI directives
116120
.PHONY: generate
117121
generate: generate/wasm generate/www ## Generate code
118122

119-
## Lint:
123+
## Code Quality:
120124
.PHONY: lint/wasm
121125
lint/wasm: ## Run Go linter
122126
golangci-lint run --verbose --timeout=5m
@@ -125,7 +129,6 @@ lint/wasm: ## Run Go linter
125129
lint/www: ## Run GUI linter
126130
$(YARN_WORKSPACE_CMD) lint
127131

128-
## Format:
129132
.PHONY: fmt/wasm
130133
fmt/wasm: ## Format Go code
131134
golangci-lint run --fix --verbose --timeout=5m
@@ -134,7 +137,7 @@ fmt/wasm: ## Format Go code
134137
fmt/www: ## Format GUI code
135138
$(YARN_WORKSPACE_CMD) format
136139

137-
## Test:
140+
## Testing:
138141
.PHONY: test/wasm
139142
test/wasm: PATH := $(PATH):$(shell dirname $(GO_WASM_EXEC_JS))
140143
test/wasm: ## Run tests for Go code
@@ -145,7 +148,7 @@ test/wasm: ## Run tests for Go code
145148
@echo "📊 Coverage report: $(COVERAGE_HTML)"
146149
ifeq ($(CI),)
147150
go tool cover -html=$(COVERAGE_DIR)/$(COVERPROFILE) -o $(COVERAGE_HTML)
148-
@echo "🌐 Run 'make cover/browser' to open coverage report in browser"
151+
@echo "🌐 Run 'make browser/cover' to open coverage report in browser"
149152
endif
150153

151154
.PHONY: bench/wasm

0 commit comments

Comments
 (0)