waliente / phaser-typescript-electron

A starter template that uses Phaser 3, TypeScript, Electron and Rollup and Vite for bundling.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phaser TypeScript Electron starter template

Phaser Typescript Electron

This is a 🕹️Phaser 3 starter with ⌨️TypeScript and ⚛️ Electron, 📦Rollup and Vite.

🔥🔥 HOT RELOAD ON ELECTRON INCLUDED! 🔥🔥


You can use this template with or without Electron. The project folder structure is:

  • client: where are the phaser ^3.55.2 with typescript 4 rollup and vite is present.
  • electron: the electron project.

Instructions

Execute inside relative folder client and electron yarn or npm install to install all dependencies required.

📁 Client folder

Inside client folder you can run Phaser with Typescript, Rollup and Vite but without Electron.

Command Description
yarn or npm install Install project dependencies
yarn dev or npm run dev Builds project and open web server, watching for changes
yarn build or npm run build Builds code bundle with production settings
yarn serve or npm run serve Run a web server to serve built code bundle

📁 Electron folder

Inside electron folder you can run Electron with Phaser! You can run in dev mode or production mode for the final preview and release.

🔥🔥 HOT RELOAD INCLUDED! 🔥🔥

Command Description
yarn Install project dependencies
yarn dev Builds project and open web server from client folder and Electron, watching for changes
yarn preview Starts a preview for a final release
yarn build Build app with Electron

TODO

  • Better manage of process.env

About

A starter template that uses Phaser 3, TypeScript, Electron and Rollup and Vite for bundling.

License:MIT License


Languages

Language:JavaScript 69.5%Language:TypeScript 24.6%Language:HTML 5.9%