edit

Commands

Phaser Node Kit only has a couple commands to get you up and running.

Init

pnkit init

To create a new Phaser Node Kit project do the following:

  • Create a new empty directory.

  • Create a package.json file (optional).

  • Run pnkit init on the command line in the directory you created.

You can create your own package.json before running pnkit init or a bare one will be created for you.

Watch

Watch the game development files, and trigger a build on changes:

pnkit watch

Phaser Node Kit will now run a build when any of the files are updated.

View the current game state in your browser at http://127.0.0.1:5550.

You can leave the browser window running, and it will refresh with each build.

Sync

There may be times when you want to clean the build directory between builds. Or perhaps you've added some files while the watcher wasn't running to catch them. You can run pnkit sync to get your build folder to be in sync again with the game folder.

pnkit sync

This will flush the build folder and rebuild the project in its current state.

Update

Updates the PhaserJS library to its latest version.

sudo pnkit update

Make sure to use the sudo command.