website/Makefile

33 lines
951 B
Makefile
Raw Normal View History

2025-03-28 23:12:07 +09:00
STYLE_SRC=./public/style/global.css
STYLE_DIST=./public/style/dist.css
2024-10-03 02:03:14 +09:00
all: install
install: ## Download TailwindCSS binary and install other dependencies
2025-03-29 00:04:30 +09:00
@npm ci
2024-10-03 02:03:14 +09:00
@echo "Installing qlot dependencies..."
@qlot install
2024-10-03 02:03:14 +09:00
watch: ## Start TailwindCSS in watch mode for automatic rebuilds
2025-03-29 00:04:30 +09:00
@npx @tailwindcss/cli -i $(STYLE_SRC) -o $(STYLE_DIST) --watch=always
2024-10-03 02:03:14 +09:00
build: ## Generate the final CSS output
2025-03-29 00:04:30 +09:00
@npx @tailwindcss/cli -i $(STYLE_SRC) -o $(STYLE_DIST)
2024-10-03 02:03:14 +09:00
help: ## Display available commands and their descriptions
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
2024-10-03 02:03:14 +09:00
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
2024-11-15 09:51:29 +09:00
lem: ## Open Lem with TailwindCSS server
2024-11-17 00:59:06 +09:00
@echo "Starting TailwindCSS server in background..."
2024-11-15 09:51:29 +09:00
@make watch > /dev/null 2>&1 & \
WATCH_PID=$$!; \
trap "kill $$WATCH_PID" SIGINT SIGTERM EXIT; \
lem; \
2025-03-28 23:12:07 +09:00
kill $$WATCH_PID
docker-build:
docker build -t hp .
docker-run:
docker run -p 3000:3000 hp