A TypeScript-based farming simulation game built with Phaser.js, following Google TypeScript Style Guide and best practices for code quality.
- Built with TypeScript and Phaser.js game engine
- Follows Google TypeScript Style Guide
- Comprehensive testing with Jest
- Code formatting with Prettier
- Linting with ESLint
- Continuous Integration with GitHub Actions
- Vite for fast development and building
- Node.js 18.x or 20.x
- npm
# Clone the repository
git clone <repository-url>
cd farm-game
# Install dependencies
npm install
# Start the development server
npm run dev
# The game will be available at https://localhost:3000
# Build for production
npm run build
# Preview the production build
npm run preview
npm run dev
- Start development server with hot reloadnpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Run ESLintnpm run lint:fix
- Run ESLint and fix issuesnpm run format
- Format code with Prettiernpm run format:check
- Check code formattingnpm test
- Run testsnpm run test:watch
- Run tests in watch modenpm run check
- Run all code quality checks (lint, format, test)
├── src/
│ ├── __tests__/ # Unit tests
│ ├── scenes/ # Phaser scenes
│ ├── utils/ # Utility functions
│ ├── config.ts # Game configuration
│ └── main.ts # Entry point
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.mjs # ESLint configuration
├── jest.config.js # Jest configuration
└── .prettierrc.json # Prettier configuration
This project enforces strict code quality standards:
- TypeScript: Strict mode enabled with comprehensive type checking
- ESLint: Google TypeScript Style Guide with additional rules
- Prettier: Automatic code formatting
- Jest: Unit testing framework
- GitHub Actions: Automated CI/CD pipeline
# Run tests
npm test
# Run tests with coverage
npm test -- --coverage
# Run tests in watch mode
npm run test:watch
- Create a feature branch (
git checkout -b feat/amazing-feature
) - Make your changes following the code style guidelines
- Run code quality checks (
npm run check
) - Commit your changes using Conventional Commits
- Push to the branch (
git push origin feat/amazing-feature
) - Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Matt Ball