This repository was archived by the owner on Sep 1, 2024. It is now read-only.

AndreVarandas/phaser3-rollup-typescript

Repository files navigation

Please note that this package is deprecated! You should use https://.com/phaserjs/create-game instead!

Header

This is a Phaser 3 starter template that uses TypeScript, Rollup, and offers lightning-fast Hot Module Replacement (HMR) through Vite.

This project is based on geocine's Phaser 3 TypeScript starter, with some additional features and improvements. The goal is to streamline the setup process for new Phaser 3 projects.

Key features included in this template:

  • Husky and lint-staged: Enforces code checks and formatting during commits.
  • Commitizen and cz-emoji: Helps create meaningful semantic commit messages.
  • Prettier: Automatically formats code with sorted imports.
  • Simple CSS Reset: Provides a basic CSS reset.
  • '~' Alias: Allows local imports using '~'.
CommandDescription
yarn installInstall project dependencies
yarn devBuild the project, open a web server, and watch for changes
yarn buildBuild the code bundle with production settings
yarn serveRun a web server to serve the built code bundle
yarn commitPrepare a commit message using emojis for better readability
yarn lintCheck for errors in your code
yarn lint:fixFix all fixable eslint errors in your code
yarn formatFormat all files using prettier
yarn cleanDelete the dist folder

To get started, clone the repository and run yarn install from your project directory. Then, start the local development server with yarn dev and navigate to http://localhost:3000 in your browser.

After running yarn build, you'll find the production-ready files in the dist folder. To test your code in the dist folder, run yarn serve and navigate to http://localhost:8080.

This project is licensed under the MIT License. For more details, see the LICENSE file.