-
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.11 KB
/
Copy pathMakefile
File metadata and controls
79 lines (61 loc) · 2.11 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
.PHONY: all test build format check lint clean frontend frontend-dev \
frontend-test app linux docker-run docs docs-serve
all: frontend test lint
# Build the TS/Vite frontend into src/terminux/web/static (committed).
frontend:
cd frontend && npm ci && npm run build
# Frontend unit tests (vitest, pure logic — no browser).
frontend-test:
cd frontend && npm run test
# Live frontend dev server (proxy API/WS to a running `terminux --no-window`).
frontend-dev:
cd frontend && npm run dev
# Run
run:
uv run terminux
# Package a macOS .app bundle into dist/terminux.app (PyInstaller).
build-macos: frontend
uv run --active pyinstaller --noconfirm --clean terminux.spec
# Package a Linux onedir bundle via Docker -> dist/linux/terminux.
build-linux:
docker build --target bundle -t terminux:bundle .
rm -rf dist/linux && mkdir -p dist/linux
docker create --name terminux_extract terminux:bundle >/dev/null
docker cp terminux_extract:/app/dist/terminux dist/linux/terminux
docker rm terminux_extract >/dev/null
@echo "Linux bundle: dist/linux/terminux/terminux"
# Run the app in container web mode (browse to http://localhost:8000/?t=...).
docker-run:
docker build --target bundle -t terminux:bundle .
docker run --rm -p 8000:8000 terminux:bundle
# Build the documentation site (Zensical) -> site/.
docs:
uv run zensical build
# Live docs preview with rebuild-on-save (http://127.0.0.1:8000).
docs-serve:
uv run zensical serve
check: lint
lint:
uv run --active ruff check
uv run --active ruff format --check
uv run --active ty check src
uv run --active pyrefly check src
uv run --active mypy src
format:
uv run --active ruff format src tests
uv run --active ruff check src tests --fix
uv run --active ruff format src tests
cd frontend && npm run format
# Runs the frontend (vitest) tests first, then the Python suite.
test: frontend-test
uv run pytest
test-cov:
uv run pytest --cov=terminux --cov-report=html --cov-report=term tests
clean:
rm -rf .pytest_cache .ruff_cache dist build __pycache__ .mypy_cache \
.coverage htmlcov .coverage.* *.egg-info
adt clean
build: clean frontend
uv build
publish: build
uv publish