I would like to obfuscate my code. The tutorial is under Concatenation and minification topic
These are the steps I’ve used to minify the code in hybrid app:
- export JAVA_HOME=$(/usr/libexec/java_home)
- cd /Users/keatooon/Desktop/testmfpminify2
- mfp create testProject
- cd testProject
- mfp add hybrid testApp
- mfp start
- mfp build
- mfp push
- mfp console
- mfp push —concatenate —minify
xxx:testProject xxx$ mfp push --concatenate --minify
Preparing for push...
Verifying Server Configuration...
Runtime 'testProject' will be used to push the project into.
Pushing to Server...
Deploying /Users/xxx/Desktop/wktestmfp2/testProject/bin/testApp-common.wlapp...
Deploy complete for /Users/xxx/Desktop/wktestmfp2/testProject/bin/testApp-common.wlapp.
/Users/xxx/Desktop/wktestmfp2/testProject/bin/testApp-common.wlapp has been deployed.
Push Completed Successfully.
However, it does not add any security to the code.
Code before vs after Concatenation and minification:
Moreover, the code doesn’t work at all after concatenating and minifying it.