Jump to content

Minifying/Uglifying the Game


gavvic
 Share

Recommended Posts

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? 

Link to comment
Share on other sites

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 grunt


This uses a package manager to install plugins


one of which might be Uglify.js


which handles minifying and optionally 'uglifying' your code

Normally before uglifying you want to concatenate all your code into one big js file. There is a standard grunt task for this


Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...