This is the final version of the project we create in https://snowbillr.github.io/blog/2018-04-09-a-modern-web-development-setup-for-phaser-3/.
For a guide on the concepts included in this project and how to build it from scratch, take a look at the blog post.
- Make a directory somewhere in your file system where you want to keep your project.
cd
into that directory from the command line.- Clone this project with
git clone https://github.com/snowbillr/phaser3-webpack-es6-dev-starter.git
.
- Follow the blog post for instructions on how to install Yarn if you don't already have it installed.
- From the cloned project's directory, run
yarn install
.
Once you've installed the project's dependencies, you can run the project using Webpack Dev Server.
- From your project's directory, run
yarn webpack-dev-server
. - Open up your browser to
http://localhost:8080
. - You should see a web page with a black box that says "Hello Phaser!" in green text. That's our game!
- 🎉
Because you are running the project through Webpack Dev Server, any time you make a change to your source code, the browser will automatically refresh with your updated code.