https://github.com/phaserjs/editor-starter-template-basic-typescript
A starter typescript template for Phaser Editor v4.
https://github.com/phaserjs/editor-starter-template-basic-typescript
Last synced: 4 months ago
JSON representation
A starter typescript template for Phaser Editor v4.
- Host: GitHub
- URL: https://github.com/phaserjs/editor-starter-template-basic-typescript
- Owner: phaserjs
- Created: 2024-04-09T13:32:20.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-04-09T15:25:59.000Z (over 1 year ago)
- Last Synced: 2025-04-03T22:41:49.931Z (7 months ago)
- Language: JavaScript
- Size: 112 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Basic TypeScript project template for Phaser Editor v4.
This is a Phaser Editor 2D v4 project template.
## Configuration
* It includes the latest Phaser v3 runtime as a node package.
* It is coded in TypeScript. The `tsc` is included as a node package.
* It includes a VS Code project configuration (`jsconfig.json` file).
## Compiles the source code
This project is based on TypeScript so to get the game, first, you need to install TypeScript and other dependencies:
```bash
$ npm install
$ npm update
```
Then, for running the game, you need to compile the TypeScript files:
```bash
$ npm run build
```
It outputs the JavaScript code into the `game.js` file.
Often, you would like to run the TypeScript compiler in watch mode:
```bash
$ npm start
```
## Run the editor
* If you have NodeJS installed, you can run the editor using the `editor` NPM script, defined in the `package.json` file:
```bash
$ npm install
$ npm run editor
```
* If you are in a remote environment (like the Gitpod.io IDE), then run the editor like this:
```bash
$ npm run editor-remote
```
* If you want to see all the editor options, run:
```bash
$ npx phasereditor2d-launcher -help
```
* If Phaser Editor 2D Core is globally installed, you can run:
```bash
$ PhaserEditor2D -project .
```