generator-phaser-browserify v0.3.6
generator-phaser-browserify
A Yeoman generator to generate HTML5 games with phaser using Gulp and Browserify. Built off the work by Julien Castelain on generator-phaser. Allows the use of browserify (i.e. var player = require('Player.js')) with Phaser.
Check out this test game as an example of project layout / useage.
INSTRUCTIONS
Install Node.js
Install the required npm modules by issuing these commands:
npm install -g yo generator-phaser-browserifyYou can optionally install Gulp globally
npm install -g gulpbut you don't have to.Create a new directory for your game:
- Unix/OSX :
mkdir ~/Projects/game && cd $_ - Windows :
mkdir %USERPROFILE%\Projects\game && cd %USERPROFILE%\Projects\game
- Unix/OSX :
Invoke the generator:
yo phaser-browserifyRun a local development server (livereload, watchify enabled) with this command:
npm startIf you have Gulp installed globally you can also use:
gulpPackage your game (i.e. minify css, html and js) with:
npm run buildIf you have Gulp installed globally you can also use:
gulp build
CREDITS
- @photonstorm for creating phaser.
- The guys behind yeoman.
- Gulp.js