Add convenience Makefile for building frontend and backend

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
Hugh Kaznowski
2026-09-05 13:15:39 +01:00
co-authored by Claude Sonnet 5
parent c040e16587
commit 57d23c62e9
+42
View File
@@ -0,0 +1,42 @@
.PHONY: all build build-fe build-be test test-fe test-be lint lint-fe lint-be run dev clean
all: build
# Build the webapp first so `webapp/dist` exists for the backend to serve,
# then build the Rust binary.
build: build-fe build-be
build-fe:
cd webapp && npm install && npm run build
build-be:
cargo build --release
test: test-be test-fe
test-be:
cargo test
test-fe:
cd webapp && npm run build
lint: lint-be lint-fe
lint-be:
cargo clippy --all-targets
lint-fe:
cd webapp && npm run lint
# Run the built binary, serving the webapp from webapp/dist.
run: build
./target/release/ottyl
# Frontend dev server with hot reload (proxy API calls to a separately
# running `cargo run` backend — see webapp/vite.config for the proxy setup).
dev:
cd webapp && npm run dev
clean:
cargo clean
rm -rf webapp/dist webapp/node_modules