Reset project

This commit is contained in:
2025-05-25 10:14:48 +02:00
parent 542d28e7a9
commit 6e443de84f
197 changed files with 64591 additions and 1027 deletions

View File

@@ -1,18 +1,27 @@
TARGET = ./site
.PHONY: dev build
.PHONY: clean distclean test components $(TARGET)
dev:
@if command -v $(HOME)/go/bin/air > /dev/null; then \
AIR_CMD="$(HOME)/go/bin/air"; \
elif command -v air > /dev/null; then \
AIR_CMD="air"; \
else \
read -p "air is not installed. Install it? [Y/n] " choice; \
if [ "$$choice" != "n" ] && [ "$$choice" != "N" ]; then \
echo "Installing..."; \
go install github.com/air-verse/air@latest; \
AIR_CMD="$(HOME)/go/bin/air"; \
else \
echo "Exiting..."; \
exit 1; \
fi; \
fi; \
echo "Starting Air..."; \
$$AIR_CMD
.NOTPARALLEL:
$(TARGET): components
$(info ===> BUILD site)
@go build ./cmd/site
components:
$(info ===> BUILD templates)
cd web/components && templ generate
clean:
$(info ===> CLEAN)
@go clean
@rm -f $(TARGET)
build:
@echo "Generate Tailwind CSS..."
go generate
@echo "Building Go server..."
go build -o tmp/server main.go
@echo "Build complete."