-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (61 loc) · 2.66 KB
/
Makefile
File metadata and controls
79 lines (61 loc) · 2.66 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.DEFAULT_GOAL := help
.PHONY: help install build clean dev typecheck lint test test-watch benchmark verify docker-build docker-run
# ── Help ──────────────────────────────────────────────────────────────────────
help:
@echo ""
@echo " prompt-caching — available commands"
@echo ""
@echo " Setup"
@echo " make install Install dependencies"
@echo ""
@echo " Development"
@echo " make build Compile TypeScript → dist/"
@echo " make dev Watch mode (rebuilds on save)"
@echo " make clean Remove dist/ and coverage/"
@echo ""
@echo " Quality (run before every PR)"
@echo " make typecheck TypeScript type checking — zero errors required"
@echo " make lint ESLint — zero warnings required"
@echo " make test Run all tests"
@echo " make test-watch Run tests in watch mode"
@echo " make benchmark Run cache hit rate benchmarks"
@echo " make verify Run typecheck + lint + test in sequence (CI equivalent)"
@echo ""
@echo " Docker"
@echo " make docker-build Build Docker image using node:22-alpine"
@echo " make docker-run Run the MCP server in Docker"
@echo ""
# ── Setup ─────────────────────────────────────────────────────────────────────
install:
npm ci
# ── Development ───────────────────────────────────────────────────────────────
build:
npm run build
dev:
npm run dev
clean:
rm -rf dist coverage
# ── Quality ───────────────────────────────────────────────────────────────────
typecheck:
npm run typecheck
lint:
npm run lint
test:
npm run test
test-watch:
npm run test:watch
benchmark:
npm run benchmark
verify: typecheck lint test
@echo ""
@echo " ✓ typecheck passed"
@echo " ✓ lint passed"
@echo " ✓ tests passed"
@echo ""
@echo " Ready to push."
@echo ""
# ── Docker ────────────────────────────────────────────────────────────────────
docker-build:
docker build -t prompt-caching:local .
docker-run:
docker run --rm -it prompt-caching:local