Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (44 loc) · 1.91 KB
/
Copy pathMakefile
File metadata and controls
60 lines (44 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: help db up down logs test test-e2e test-e2e-serial build clean nuke fmt fmt-all clippy check seed
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
db: ## Start PostgreSQL via docker compose
docker compose up -d postgres
up: ## Start all services
docker compose up --build -d
down: ## Stop all services and remove volumes (deletes DB data)
docker compose down -v
logs: ## Tail logs from all services
docker compose logs -f
seed: ## Seed the database with sample data
./scripts/seed-db.sh
test: ## Run unit + integration tests
cargo test --workspace --lib
test-e2e: ## Run full E2E test suite (requires running services)
./scripts/test-e2e.sh
test-e2e-serial: ## Run e2e tests serialized to one Postgres container at a time
cargo test -p e2e-tests --tests -- --test-threads=1
build: ## Build all binaries in release mode
cargo build --release --workspace
clean: ## Clean Rust build artifacts
cargo clean
nuke: clean ## Full cleanup including Docker volumes
docker compose down -v
fmt: ## Format all Rust code
cargo fmt --all
fmt-all: ## Format all Rust code + view! macros
@if command -v leptosfmt >/dev/null 2>&1; then \
find live-search i18n-demo -name '*.rs' -print | while read -r f; do \
leptosfmt --rustfmt --stdin --quiet < "$$f" > "$$f.tmp" && mv "$$f.tmp" "$$f"; \
done; \
else \
echo "leptosfmt not installed; install with: cargo install leptosfmt --locked"; \
fi
cargo fmt --all
clippy: ## Run clippy lints
cargo clippy --workspace --all-targets -- -D warnings
cargo clippy -p live-search --features ssr --all-targets -- -D warnings
check: ## Type-check all Rust code
cargo check --workspace --all-targets
cargo check -p live-search --features ssr --all-targets
rustup target add wasm32-unknown-unknown
cargo check -p live-search --target wasm32-unknown-unknown --features hydrate --lib