Closed rolinger closed 5 years ago
You can use this hook with an ionic v1 app but when you update to v4 this hook will no longer be needed. Their CLI provides a way to minify/uglify your code (see here https://ionicframework.com/docs/developer-resources/app-scripts/)
--release
option is provided. There is also the alwaysRun
option in the uglify-config.json
.platforms/${platform}/www
. It never uses what is on the www root for a packaged app (debug or release).JSON.stringify(obj)
if the JSON is "prettified". I don't think you'd want to uglify or obfuscate the json files. There is probably a library out there to do that if you really need it.Thanks
Hello,
I have never used uglify or minify with any of my programming before, never quite had a business need to do so, but now I do. A few questions if you will. I have created an ionic v1 app (a while ago) for both android and ios - i will be doing a massive overhaul to move from v1 to v4 in the coming months - but just not there yet. I develop for Android on a windows 7 system and iOS on Mac (obviously).
If I install this plugin:
Can I install it in such a way to only uglify/minify my code for when its time to release the app to the stores? I want to be able to still use console and see my html/css when I use chrome/safari inspector tools while developing. I have read about the
--release
option, but does that mean when using the option it DOES uglify at that moment...or does installing it auto uglify everytime unless you specify--release
at which time it won't uglify.On iOS, I compile everything from command line
cordova build myApp
and then run it from Xcode to the simulator or to a real device, if uglified (pre-release) will Xcode still be able to see the readable code from the project www root or is it reading code from the platform/www? (for Android I do everything via CLI and only use Studio for SDK Package Manager)I read the image compression is removed and that HTML is not yet being compressed, is this still the case for both?
I use a few local json files in platform/assets folders, mainly app initialization stuff. Will those files get uglified/minified too?
Are there any additional things I need to be aware of considering my project is on the older ionic v1 platform?
This plugin does everything during the build/prepare process, are there any methods you are aware of that will allow me to ugilify/minify json files that are stored to local assets while the app is running? My app checks for updated json files from central servers for various services and stores them locally for future use, is there anyway I can minify/uglify those json files while the app is running...so it stores them uglified?