Open bungle opened 11 years ago
You're not missing anything. We minify everything first in order to allow people to minify files that will not be concatenated. it would be easy to swap the order, but it would be hairy to do it for the larger project, I think. I'd have to look at it.
I think you got it, but in other words the problem is that, say I have this:
<!-- //-beg- concat_js -->
Lots of JS-files here (that are calling each other,
but Closure Compiler does not know it because
everything is minified separately).
<!-- //-end- concat_js -->
It is really important to first concate everything between those tags, and after that minify. Otherwise ADVANCED_OPTIMIZATIONS is useless. This is the only place where you should concatenate first, others are fine as is.
Yes, I see your problem clearly. I was just pointing out why the script is the way it is. I don't have an answer off the top of my head as to how I would be able to reconfigure it in order to solve your problem while retaining the existing ease of use. I'd be happy to be able to solve your problem as long as I don't add any further complexity to the set up.
I see how this can add a little bit complexity, i.e. should we then also have separate options for minifying process (i.e. ADVANCED_OPTIOMIZATIONS for concatenated js-file, and SIMPLE_OPTIMIZATIONS for others).
I wasn't even thinking about that, but yes, that would open up further complexity. That would be a nice feature to add, actually.
If I understand correctly, this ANT Build task does js-minification in this order:
This is really problematic if you want to use Closure Compiler's ADVANCED_OPTIMIZATIONS. The order should be reversed:
Or have I understood something wrong?