A template to quickly start building a game using all the neat features of ES6.
Supports deploying to GitHub Pages in a single command.
Using babel
to transpile ES6 to ES5 to support all the modern browsers.
Needs node.js
to work.
src
- Actual game source inES6
assets
- Game assets and CSSlib
- Main library files, likephaser.js
js
- Compiled JavaScript inES5
dist
- Full game ready to be distributedindex.html
- Game pagedist.zip
- Zipped version ofdist
folder
- Clone this repository
- Create a new GitHub repository
- Set
origin
url to your repository by runninggit remote set-url origin <your-repo-clone-url>
- Install dependencies by running
npm install
- Install
gulp
globally by runningnpm install -g gulp
, this needs to be run withsudo
on Linux, likesudo npm install -g gulp
- Run
gulp watch server
to continuously monitor sources and rebuild as needed. This also starts HTTP server at http://localhost:8000 - Run
gulp deploy
to push to GitHub Pages, this will make your game available athttp://<your-username>.github.io/<repo-name>
, like http://shvelo.github.io/phaser-es6-template
default
- Copy libraries and compile source.watch
- Monitor for changes in sources and recompile as neededphaser
- Copy phaser.js files fromnode_modules
tolib
webpack
- Compile game sourcedeploy
- Createdist
and deploy it togh-pages
branch, this makes the game playable via GitHub Pagesclean
- Removedist
anddist.zip
dist
- Createdist
folder by copying assets and compiled sources to it.zip
- Createdist.zip
fromdist