The apps to be released (apk|ipa|xap) are minified during the build process.
Appery.io uses Grunt JS Task Runner for minifying code in its projects.
During the minification process, functions and variables get renamed and code fragments are modified (obfuscated). Mostly, such modifications lead to securing and reducing the code but some problems may arise calling for changing minification settings.
Managing AngularJS apps minification
The default settings use
If any of your files (
libs or custom
JS) returns an error during minification, you can repair the code or update the minification settings to avoid further errors making changes to the minification settings, adding the errorneus files to the ignore list, or disabling minification.
Let’s have a look at some examples.
Changing minification settings
To fully disable minification, delete the following tasks from the default tasks list:
Adding custom modules
You can also add a third-party
grunt module to be used for minification (for example, image minification module). To do this, create a
node_modules folder and upload the needed
grunt module to this folder. In cases the module is very bulky (and the Builder notifies on upload error), you can split the folder into several
.zip files and upload them separately.
Then, you can add this module to
grunt.loadNpmTasks('module-name');, create the task and then add this task to the default tasks array.
PhoneListCtrlcontroller brings about the problem of correct services identification. You can check here to learn how to overcome the problem.