This answer made me understand UglifyJS2 allows us to Uglify multiple .js files at the same time (in order not to break the code when using the same global variables).
The code I want to uglify is very messy: I have some some inline scripts (such as onclick=
), some scripts inside <script>
tags and a few separate .js files.
I'm confused on how I should proceed to Uglify/obfuscate/minify/gzip them with UglifyJS without breaking any code.