diff options
| author | Bobby <[email protected]> | 2026-01-20 14:02:34 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-01-20 14:02:34 +0530 |
| commit | 7fee36b4fbae90dacdecb917e262ad58927fe746 (patch) | |
| tree | 3739af9bf8d2e78c6536a7dfa24ce391abb90ff1 /Makefile | |
| parent | 61d5f45189a40621bceeb14c6646031dd15ab6c2 (diff) | |
| download | cafe-7fee36b4fbae90dacdecb917e262ad58927fe746.tar.xz cafe-7fee36b4fbae90dacdecb917e262ad58927fe746.zip | |
Add Tailwind CSS and HTMX integration and implement custom template tags
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -2,13 +2,16 @@ BINARY_NAME=cafe BUILD_PATH=bin/$(BINARY_NAME) MAIN_PATH=$(BINARY_NAME)/main.go COMPOSE_DEV=toolchain/docker-compose.dev.yml +TAILWIND=toolchain/tailwind -.PHONY: setup clean tidy build run dev test postgres stop reset all +.PHONY: setup clean tidy build run dev test postgres stop reset css watch all setup: @echo "Setting up environment..." @go mod download @go mod tidy + @./scripts/tailwind.setup.sh + @./scripts/htmx.setup.sh @echo "Environment setup complete." clean: @@ -32,7 +35,7 @@ run: @echo "Running..." @$(BUILD_PATH) || true -dev: +dev: css @echo "Running in development mode..." @go run $(MAIN_PATH) || true @@ -52,6 +55,16 @@ reset: @echo "Resetting database..." @./scripts/reset.db.sh +css: + @if [ ! -f $(TAILWIND) ]; then echo "Tailwind not found. Installing..."; ./scripts/install.tailwind.sh; fi + @echo "Building CSS..." + @$(TAILWIND) -i static/css/tailwind.css -o static/css/style.css --minify + +watch: + @if [ ! -f $(TAILWIND) ]; then echo "Tailwind not found. Installing..."; ./scripts/install.tailwind.sh; fi + @echo "Watching CSS..." + @$(TAILWIND) -i static/css/tailwind.css -o static/css/style.css --watch + all: setup clean build run .SILENT:
\ No newline at end of file |
