Classic Minesweeper created with PixiJS. Play the game here!
Now with PixiV8 and WebGPU support.
- Node.js 20 (see
.nvmrc) — use nvm to install the correct version:nvm install nvm use
npm installnpm start- Start the development server with modern settings (alias fornpm run serve-modern)npm run serve- Start webpack development servernpm run serve-modern- Start development server with modern browser optimizationsnpm run serve-prod- Start development server in production mode
npm run build- Build the project for production (optimized bundle)npm run build-dev- Build the project in development mode (unoptimized)
npm test- Run the test suite (6 suites covering game state logic, color utilities, math helpers, event system, and utility functions)npm run test-watch- Run tests in watch mode (automatically re-runs on file changes)
npm run lint- Check code for linting errors using ESLintnpm run lint:fix- Automatically fix linting errors where possiblenpm run prettier- Check TypeScript source files formattingnpm run prettier:fix- Format TypeScript source files
When running the development server, the application will be available at:
- URL:
http://localhost:3000 - The server runs on all network interfaces (
0.0.0.0), making it accessible from other devices on your local network
Production builds are output to the build/ directory and include:
- Optimized JavaScript bundle
- Source maps for debugging
- All static assets from the
static/folder - Generated
index.html
This project follows a trunk-based development model with short-lived feature branches:
masteris the main branch — it should always be deployable and receives all merges- Feature/fix branches are created from
masterfor all changes - Pull requests target
masterand are rebased ontomasterwhen merging to keep a linear commit history - Release PRs are automatically generated by release-please on
master - No long-lived branches exist besides
master
The project uses GitHub Actions for continuous integration and deployment to Firebase Hosting.
| Workflow | Trigger | Purpose |
|---|---|---|
| Lint & Test | PRs to master | Runs npm run lint and npm test |
| Release | Push to master / manual | On push to master: creates tags, GitHub releases, and triggers deploy (PRs are skipped). On manual dispatch: creates release PRs via release-please |
| Deploy | Manual / called by Release | Builds and deploys to Firebase Hosting |
- Merge feature PRs to master using Conventional Commits (
feat:,fix:,chore:, etc.) - Go to Actions > Release > Run workflow to create a release PR
- Review and merge the release PR (requires
--adminto bypass checks) - The Release workflow runs on the push, creates a
v*tag and GitHub release, then automatically triggers the Deploy job
Version is determined from commit prefixes:
| Prefix | Bump | Example |
|---|---|---|
fix: |
Patch | 0.0.1 → 0.0.2 |
feat: |
Minor (patch while pre-1.0) | 0.0.1 → 0.0.2 |
feat!: / BREAKING CHANGE: |
Major (minor while pre-1.0) | 0.0.2 → 0.1.0 |
To override the version, include a Release-As: x.y.z footer in a commit message (e.g., chore: prepare release\n\nRelease-As: 1.0.0) before running the Release workflow.
| Secret | Description |
|---|---|
FIREBASE_SERVICE_ACCOUNT |
Firebase service account JSON key (from Firebase Console > Project Settings > Service accounts) |
- PixiJS - WebGL rendering engine
- TypeScript - Type-safe JavaScript
- Webpack - Module bundler and development server
- Jest - Testing framework
- Spine - 2D skeletal animation
- Tone.js - Web Audio framework for interactive music and sound
- tweenjs - Animation tweening
- @tonejs/midi - MIDI file parsing and playback
- ESLint + Prettier - Code linting and formatting