Gods Posted May 7, 2015 Share Posted May 7, 2015 A phaser game has a html, css and normally multiple js files along with images and sound.IMG folderAudio folderindex.htmlstyle.cssPreloader.jsBoot.jsGame.js Do you guys compress the images and audio files too? Whats the simplest and fastest way you guys compress all these files? I am hoping a single command line to do it all It seems Phaser comes with a Gruntfile.js file but how do I use it and what does it do? Link to comment Share on other sites More sharing options...
drhayes Posted May 7, 2015 Share Posted May 7, 2015 UglifyJS is a good JS minifier. Combining that with browserify or webpack could be useful to concat all your files into one file. Or just, literally, concat your files yourself before running through Uglify. Yes, it's possible to optimize images as well -- check out png crush. Or stick all your sprites into sprite atlases as possible (but watch the image size if going for mobile). All of these things can be done from the command line with some shell scripting, Grunt, gulp, or even Makefiles. Link to comment Share on other sites More sharing options...
stupot Posted May 7, 2015 Share Posted May 7, 2015 UglifyJS2 (UglifyJS's successor) will also concat your files into one, as well as offering a wealth of minification options. drhayes 1 Link to comment Share on other sites More sharing options...
Recommended Posts