Files
comicverse/makefile

40 lines
796 B
Makefile
Raw Normal View History

PORT?=8080
2025-03-05 10:05:21 -03:00
lint:
golangci-lint run .
2025-03-05 10:05:21 -03:00
fmt:
go fmt .
golangci-lint run --fix .
2025-03-06 10:02:35 -03:00
dev/server:
go run github.com/joho/godotenv/cmd/godotenv@v1.5.1 \
2025-03-05 10:05:21 -03:00
go run github.com/air-verse/air@v1.52.2 \
2025-03-07 20:34:31 -03:00
--build.cmd "go build -o tmp/bin/main ./cmd" \
--build.bin "tmp/bin/main" \
2025-03-05 10:05:21 -03:00
--build.exclude_dir "node_modules" \
2025-03-05 11:00:28 -03:00
--build.include_ext "go,html" \
2025-03-05 10:05:21 -03:00
--build.stop_on_error "false" \
--misc.clean_on_exit true \
2025-03-07 20:33:39 -03:00
-- -dev -port $(PORT) -hostname 0.0.0.0
2025-03-06 10:02:35 -03:00
dev/assets:
tailwindcss -o ./static/css/wind.css -w
dev:
$(MAKE) -j2 dev/assets dev/server
2025-03-06 10:02:35 -03:00
2025-03-05 10:05:21 -03:00
build:
2025-03-06 10:02:35 -03:00
go generate
go build -o ./.dist/app .
2024-10-11 22:19:07 -03:00
run: build
./.dist/app
2024-10-11 22:19:07 -03:00
clean:
# Remove generated directories
if [[ -d ".dist" ]]; then rm -r ./.dist; fi
if [[ -d "tmp" ]]; then rm -r ./tmp; fi
if [[ -d "bin" ]]; then rm -r ./bin; fi