gavvic Posted October 21, 2015 Share Posted October 21, 2015 Hello all, I recently stumbled across the usage of minifying/uglifying Javascript code to obscure it from users in production. Is there a way to do this with PandaJS, considering its modular framework? If so, can someone share with me how it can be done? Quote Link to comment Share on other sites More sharing options...
alex_h Posted October 21, 2015 Share Posted October 21, 2015 The process of minification is something you configure as part of a build process so is not a responsibility of Panda / Phaser / any game framework. You normally run minification via a task manager like grunthttp://gruntjs.com/This uses a package manager to install pluginshttps://www.npmjs.com/one of which might be Uglify.jshttps://github.com/gruntjs/grunt-contrib-uglifywhich handles minifying and optionally 'uglifying' your codeNormally before uglifying you want to concatenate all your code into one big js file. There is a standard grunt task for thishttps://github.com/gruntjs/grunt-contrib-concat gaelbeltran 1 Quote Link to comment Share on other sites More sharing options...
WombatTurkey Posted October 22, 2015 Share Posted October 22, 2015 For small code on the fly I usually use: http://jscompress.com/ Which is using https://github.com/mishoo/UglifyJS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.