|
Question:
Minify compress obfuscate javascript css ?In build process for a site with ANT is it possible to integrate some task to compress javascript and CSS files?
If you know some tool or ant task, please write your solutions for this. Minifying Javascript will generate less traffic for enduser of the site and will optimize overall performance. Actually, I just analyze response headers and content with another excellent tool - Firebug. In the phase when application had been optimized against almost all possible bottlenecks, I decided to use a sort of compression (but not gzip) of resource files (js, css) based on their structure.
You can download libraries yuicompressor-2.3.4.jar from http://www.julienlecomte.net/yuicompressor/
and YUIAnt.jar from http://www.ubik-ingenierie.com/ubikwiki/index.php?title=Minifying_JS/CSS and in your ant build file you can make target like this : This code can minify(compress, minimize size) and obfuscate your Javascript (JS) files and your cascade style sheet (CSS) files. You can integrate this into your continious build as ANT task. Easy and suitable, istn't it!? Vote:
For javascript i am using http://javascriptcompressor.com But for css most of the optimizers are buggy so you have to test them first.
Vote:
Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
|
|