diff --git a/justfile b/justfile index 3dc3e5d..f4e53c9 100644 --- a/justfile +++ b/justfile @@ -1,34 +1,38 @@ _default: @just --list --unsorted --justfile {{justfile()}} -# Run the development server in mprocs +[working-directory: 'frontend'] +# Perform setup for the frontend using `npm` +setup-frontend: + npm install --no-fund --no-audit + +[working-directory: 'backend'] +# Perform setup to target Android in the backend +setup-android: + cargo tauri android init + +# Run locally dev: - nix develop --command cargo tauri dev + cargo tauri dev +# Connect and run on an Android VM/Physical device dev-android: - nix develop -c cargo tauri android dev + cargo tauri android dev -# Run a development shell -shell: - nix develop - -# Execute a single command within the shell -run *CMD: - nix develop --command {{CMD}} +[working-directory: 'backend'] +# Run a check on the backend +check-backend: + cargo check + cargo clippy --fix --allow-dirty --allow-staged -- -D warnings -# Run an npm command within frontend [working-directory: 'frontend'] -npm *CMD: - nix develop --command npm {{CMD}} - -# Run a cargo command within backend -[working-directory: 'backend'] -cargo *CMD: - nix develop --command cargo {{CMD}} +# Run lint on the frontend +check-frontend: + npm run lint # Export types from the backend to TypeScript bindings [working-directory: 'backend'] export-types: - nix develop --command cargo run --bin export-types ../frontend/src/bindings.ts - nix develop --command prettier --write ../frontend/src/bindings.ts + cargo run --bin export-types ../frontend/src/bindings.ts + prettier --write ../frontend/src/bindings.ts