This directory contains shell scripts to help with common development tasks.
Builds the project for all enabled targets in universe.toml.
Usage:
./scripts/build-all.shWhat it does:
- Checks for
universe.toml - Verifies
pxcommand is available - Builds for each enabled target (native, wasm, ios, embedded)
- Skips disabled targets
- Reports build status
Runs tests for the project.
Usage:
./scripts/test.shWhat it does:
- Checks for
tests/directory - Runs PHPUnit if available
- Falls back to syntax checking if PHPUnit not found
- Creates example test file if tests directory doesn't exist
Removes build artifacts and temporary files.
Usage:
./scripts/clean.shWhat it removes:
dist/directory*.wasmfiles*.oobject files*.aarchive files.phpunit.result.cachefiles
If scripts aren't executable:
chmod +x scripts/*.shThese scripts are designed for Unix-like systems (Linux, macOS). For Windows:
- Use Git Bash or WSL
- Or adapt scripts to PowerShell/batch files
- Or use the PHP tools directly
To add a new script:
- Create a shell script in this directory
- Add shebang:
#!/bin/bash - Use
set -efor error handling - Add clear echo messages
- Document it in this README