mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 02:25:04 -06:00
refactor(just): reorganize Justfiles to match project architecture and format code
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user