This is a Phaser 3 starter with TypeScript, Rollup with ⚡️ lightning fast HMR through Vite.
This boilerplate is an extension of https://github.com/geocine/phaser3-rollup-typescript.
The boilerplate includes
It uses husky to lint staged files (with help of lint-staged) before commit and lint the commit message to adhere to conventional commits.
You can simply clone the repo. However, another great option is to use degit, a tool that makes scaffolding easy. I use the community drriven fork.
After installing degit (or tigit) globally you can simply create a clone of this boilerplate with:
degit https://github.com/torueck/phaser3-ts-vite-boilerplate my-project-name
Command | Description |
---|---|
yarn install |
Install project dependencies |
yarn dev |
Builds project and starts dev server with fast HMA through vite |
yarn build |
Builds code bundle with production settings |
yarn serve |
Run a web server to serve production built code bundle |
yarn lint |
Lint the code using ESLint |
yarn lint:fix |
Lint the code using ESLint and fix issues if possible |
yarn type-check |
Type-check the code using the TypeScript transpiler |
After cloning the repo, run yarn install
from your project directory. Then, you can start the local development
server by running yarn dev
and navigate to http://localhost:3000.
After running yarn build
, the files you need for production will be on the dist
folder. To test code on your dist
folder, run yarn serve
and navigate to http://localhost:5000