Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Latest commit

 

History

History
88 lines (60 loc) · 2.3 KB

README.md

File metadata and controls

88 lines (60 loc) · 2.3 KB

Brunch with Phaser 3

A Brunch skeleton for making games with Phaser 3. (But lately I'm using Parcel instead.)

brunch new <project> -s phaser

Or choose one of these variants:

Get started

  • Install (if you don't have them):
  • Run:
    • brunch new <project> -s phaser
    • npm run start or brunch watch --server watches the project with continuous rebuild.
    • npm run build or brunch build --production builds a minified project for production.
    • trouble?
  • Make:
    • Write your code in app.
    • Put game assets in assets.

Phaser

Phaser is managed through npm. The latest release is installed when you create a new project.

npm view phaser version

You can install a specific version instead:

npm install -S phaser@3.7

Update with:

npm update

Other builds

See the npm.static entry in brunch-config.

Add packages

npm install -S <package-name>

and in your code:

require('package-name');

Add other libraries

Add the unminified script to vendor.

Configuration

Save

You can make your own local skeleton (template):

git clone https://github.com/samme/brunch-phaser.git brunch-phaser
cd brunch-phaser
# If you make changes, commit them to master:
git commit # etc.

Now use it with brunch new:

brunch new <project> -s ./path/to/brunch-phaser