refactor(just): reorganize Justfiles to match project architecture and format code

This commit is contained in:
2025-12-30 04:20:19 -06:00
parent 884f42a855
commit eedf22f86d
10 changed files with 161 additions and 83 deletions
+31 -7
View File
@@ -8,27 +8,51 @@ mod web 'web/Justfile'
default:
@just --list --list-submodules
alias b := bun
alias bu := bun
# Runs 'bun' from within the 'web/' folder
bun *args:
cd web/ && bun {{args}}
alias bx := bunx
alias bux := bunx
# Runs 'bunx' from within the 'web/' folder
bunx *args:
cd web/ && bunx {{args}}
# Run the game (pacman::run)
run *args:
@just pacman::run {{args}}
# Run all checks (pacman::check)
# Run all checks (Rust workspace + web)
check:
@just pacman::check
@echo "Checking format..."
@cargo fmt --all -- --check || echo "⚠ Format issues detected (run \`just format\` to fix)"
@echo "Running clippy for desktop target..."
@cargo clippy --workspace --all-targets --all-features --quiet -- -D warnings || true
@echo "Running clippy for wasm target..."
@cargo clippy -p pacman --target wasm32-unknown-emscripten --all-targets --all-features --quiet -- -D warnings || true
@echo "Running web checks..."
@just web::check || true
@echo "Check complete!"
alias lint := check
# Run tests (pacman::test)
# Run tests (Rust workspace + web)
test:
@just pacman::test
cargo nextest run --workspace --no-fail-fast
@just web::test || true
# Format code (pacman::format)
# Format code (Rust workspace + web)
format:
@just pacman::format
cargo fmt --all
@just web::format
alias fmt := format
# Frontend dev server (web::dev)
# Dev servers (web + server)
dev:
@just web::dev