#Phaser-db5-Seed
This project is an application skeleton for a typical phaser.js game. You can use it to quickly test, build and deploy your phaser projects.
Based off of phaser-bootstrap with the exception of using Gulp.js instead of Grunt.js.
It includes a basic splash screen, loading bar and instruction panel.
##Getting Started
npm install gulp -g
npm install
gulp init
This will download and install the necessary files to get started.
Now you can just run
gulp
This will start a task that will watch for changes to files in the "src" directory. When they are updated the webserver will automatically reload and jshint will get run, letting you know if there are any linting issues that need resolved.
gulp build
This will package up your game in the dist directory for deployment.
You can test the distribution package before deployment by running gulp dist-server
to fire up a webserver from the "dist" folder.
Edit rsync-config.json
{
"rsync": {
"username": "yourusername",
"hostname": "yourdomain",
"destination": "/path/on/server/"
}
}
Change these settings to reflect your servers settings. Then run
gulp deploy
to upload the game files to your server.
Watches for changes to files in the "src" directory and updates the webserver and runs linting tools on the files with they are changed.
Starts a browser loading content from the src directory
Starts a server loading content from the dist directory. Assuming it's been built already.
Downloads phaser.min.js, phaser.map and phaser-debug.js to the src/js/lib
directory.
Downloads phaser.min.js and phaser.map to the src/js/lib
directory.
Downloads phaser-debug.js to the src/js/lib
directory
Clears all files out of the "dist" direcotry
Copies the files/structure in the src/assets
directory with the exception of images and javascript.
Copies and compresses the png's in the src/assets/images/
direcotyr
Runs clean, copy and imagemin. It aslo uses usemin to concatenate and minify the HTML, JS and CSS in the "src" directory and place it in the "dist" directory
Runs jshint on the files in src/js/*.js
Watches src/js/*.js
and src/index.html
and runs the lint task when these files are changed.
Rsyncs the files in the dist directory to a remote server specified in the rsync-config.json
file.