Automatically creates Phaser simple load commands from a directory of assets.
- Install Node.js
- Open empty directory and install Grunt with
npm install grunt --save-dev
- Put the Gruntfile.js and package.json files into that directory
- Create a folder called 'assets' in the same directory and put all of your images, sounds, spritesheets in there. The internal structure of the asset folder doesn't matter. The script will find all the files and their corresponding paths.
- Open a command line in that directory and run
grunt
orgrunt default
(it does the same thing) - If all went right, you should see a green "Done, without errors" message in the log.
- There should be a directory called dest with a .js file with all the Phaser commands. Copy that into your game and get coding. =)