Initialize Clash Web source and deployment documentation

This commit is contained in:
lhc committed 2026-10-05 17:32:00 +08:00
commit 8e0fa00a73
66 files changed
+8532

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
.PHONY: dev frontend build test integration e2e assets
dev: frontend
go run ./cmd/clashweb
frontend:
cd web && npm ci && npm run build
build: frontend
mkdir -p bin
CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o bin/clashweb ./cmd/clashweb
test: frontend
go test -race ./...
cd web && npm run typecheck && npm run test
assets:
python3 scripts/fetch-mihomo.py
python3 scripts/fetch-rules.py
integration: frontend
CLASHWEB_TEST_MIHOMO_BIN="$(CURDIR)/bin/mihomo" CLASHWEB_TEST_RULES_DIR="$(CURDIR)/data/mihomo/rules" go test -race ./...
e2e: build
python3 scripts/test-e2e.py