0.0.9 • Published 8 years ago

generator-yo-phaser v0.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

yo-phaser

Build Status

A fork of the excellent slush-phaser-plus converted to use Yeoman.

Uses Gulp, BrowserSync, Browserify, and Babel for development in ES6 in a live environment.

Prerequisites

Installation

npm install -g yo generator-yo-phaser

Usage

Create a new directory for your project to live in, change to the directory and run the generator.

mkdir <project-name>
cd <project-name>
yo yo-phaser

Development

The following npm scripts are available to you, performing the tasks as described below.

npm start     # Launch a development server. Same as `gulp dev`.
npm run dist  # Prepare the game release for distribution. Also `gulp dist`.
npm run clean # Delete temporary and distribution build files.
npm test      # Run the test files contained in the test directory, supports es6 syntax

Sub-generators

There are four sub-generators for common tasks.

yo yo-phaser:<sub-generator>
  • state : Generates a new class extending Phaser.State and adds it to the imported states.
  • object : Allows you to select a Phaser base class to extend or just create an empty class
  • plugin : Extends Phaser.Plugin
  • test : Creates a new test file for the class specified (does not yet support testing a full integration of Phaser, you must import any Phaser classes that you use)

License

Source code distributed under the terms of the MIT License.