Download and unzip... wherever you feel like: Phaser Project
In whatever folder you unzipped into:
npm install
In the long run, I think we could prepackage the entire project up in a zip/tar so people could just download PhaserProject.zip, and have dependencies already in the structure, so no need for npm install
ing
Now! The cool bits!
There's a handy little script, phaser.js in the top level. Theoretically, if you aren't on windows, you should be able to use it by running phaser
. If you're on windows (or that doesn't work for whatever reason), node phaser
will work.
So here's what you can do:
phaser project:make MyProject
This will create a folder in projects/MyProject, with the Hello Phaser example prebuilt.
If you want to see examples/docs/projects,
phaser serve
Now visit localhost:8000
If you go to the examples page, only the 3 animation examples have been switched over to the new setup right now.
But the cool thing is all your projects will be listed on the index page :D
phaser project:delete projectname
Follow the prompt, and it'll chastise you appropriately for cruelly destroying an innocent project.
In the future, I want to make it possible for the user to create a project by specifying a template name...
phaser project:make MyProject a_custom_template_name
That way we can have a Hello Phaser template, or a super barebones empty template, or something more complex.
I've already got the basic functionality for supporting templates in, just need to make it possible to choose
It's kind of ugly and messy
Obviously.
So we can easily make a clean zip archive of the project skeleton for releasing
Like ways to let users package up their own project, ways to update a project to have the newest version of phaser, etc etc