0.0.1 • Published 4 years ago

phaser-3-hygen v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Phaser-3-Hygen

A Hygen Phaser 3 Project Generator. Currently, this generator only supports TypeScript projects.

Quick Start

This section provides the basic commands needed to generate a project using this generator. For more detailed instructions and more information, please see relevant section of the README.md.

npx phaser-3-hygen phaser template

You should then be prompted for some additional infomation about your project. Once the project is generated, navigate to that generated project folder and run npm install and then npm run dev to launch the dev server with your Phaser 3 game.

Generate a project

In order to run the generator, you will need to use npx to run the generator, or you will need to install the package globally.

Install

To install the package globally:

npm install -g phaser-3-hygen

Or, you can use npx to install the package:

npx phaser-3-hygen phaser help

Running the generator

If you installed the package in your project and not globally, you can run the generator by running:

node node_modules/.bin/phaser-hygen phaser help

If you installed the package globally, you can run the generator by running:

phaser-hygen phaser help

If you use npx to install the package, the generator should be ran automatically.

Note: when you run one of the commands above, you should be shown a list of actions that you can run with this template generator.

Available Hygen Actions

CommandDescription
phaser-3-hygen phaser helpDisplays the available actions you can take for this generator
phaser-3-hygen phaser sceneCreates a basic Scene Class that extends the Phaser.Scene class
phaser-3-hygen phaser templateCreates a basic Phaser 3 TypeScript project

Running the project

Once you have generated your project, you will need to install the required dependencies for that project. To do this just run: npm install. Once everything is installed, you can run one of the following commands:

CommandDescription
npm run lintLints the project using tslint
npm run devBuilds project and open web server, but do not watch for changes
npm run buildBuilds code bundle with production settings (minification, no source maps, etc..)

Publishing New Version

In order to create a new beta version of this package, you can use the npm version command. This command will also create a git tag with the same version number. Example: npm version 0.0.2

Once you do this, you can run the npm run package-publish script.

Beta

In order to create a new beta version of this package, you can use the same command as above, but you will need to append -beta.0. Example: npm version 0.0.2-beta.0

Once you do this, you can run the npm run package-publish:beta script.

0.0.1

4 years ago

0.0.1-beta.0

4 years ago