- hatch_build.py: custom hatchling build hook that compiles the React frontend (npm ci + build) when frontend/dist is missing or stale, so 'uv tool install git+https://gitea.zephyre.one/Pakobbix/nvcurve.git' works as a single command - install.sh: curl|bash installer (checks prerequisites, auto-installs uv, clones and installs) - Makefile: dev targets (frontend, install, dev, test, clean) - README/docs: document the one-liner, clone, and direct-git installs
29 lines
876 B
Makefile
29 lines
876 B
Makefile
# NVCurve — developer convenience targets.
|
|
#
|
|
# End users don't need make: run ./install.sh (see README "Installation").
|
|
|
|
UV ?= uv
|
|
NPM ?= npm
|
|
|
|
.PHONY: help frontend frontend-dev install dev test clean
|
|
|
|
help: ## Show available targets
|
|
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
|
|
|
|
frontend: ## Build the React frontend into frontend/dist
|
|
cd frontend && $(NPM) ci && $(NPM) run build
|
|
|
|
frontend-dev: ## Run the Vite dev server (hot reload)
|
|
cd frontend && $(NPM) run dev
|
|
|
|
install: ## Install nvcurve as a uv tool (builds frontend if missing/stale)
|
|
$(UV) tool install --force .
|
|
|
|
dev: ## Create/refresh the dev environment (uv sync)
|
|
$(UV) sync
|
|
|
|
test: ## Run the test suite
|
|
$(UV) run python tests/test_security.py
|
|
|
|
clean: ## Remove build artifacts
|
|
rm -rf frontend/dist frontend/node_modules
|