Even though the Google Closure Compiler is very useful for compressing JavaScript it has absolutely no support for CSS, something that the YUI Compressor excels at. I give you the YUI Compressor TextMate bundle, an almost direct port of the Google Closure Compiler TextMate bundle but with a different compression library.
It has support for compressing multiple JavaScript and CSS files at the same time; just select the files you want to compress and hit ⇧⌘Y.
Requirements
The YUI Compressor bundle requires:
- The YUI Compressor
- Ruby version 1.8.7 or greater (installed as default on Mac OS 10.5 and above)
- and TextMate (obviously)
Please make sure you read the README before installing. The YUI Compressor TextMate bundle is licenced under the GPL Licence. This bundle has only been tested with the latest versions of Mac OS X (v10.6.2) and TextMate (v1.5.8) but should work with earlier versions as long as the requirements above are met.
Get It
Using this bundle? Got any suggestions? Let me know in the comments!
Thanks for putting this bundle together.
farneman added these pithy words on Dec 02.09 at 12:15 amOne problem I have noticed is that it errors out (java.io error) is the path to the file being compressed contains any spaces. Is there any possible remedy for this?
I work in an environment where I don't always have control of folder names due to the same folders being shared and accessed by multiple people.
I've just updated the bundle to v0.2.1, this should fix the problem you've been having.
Matt added these pithy words on Dec 02.09 at 11:46 amHi Matt this is amazing!
I'm comparing the output to http://yui.2clics.net/ and I see that your bundle doesn't seem to 'munge' the var names- is this because you're calling the jar with –nomunge ?
If so, is there any way to get it munged?
Also, would it be possible to customize the output filename at all?
Bodyscanner added these pithy words on Apr 29.10 at 12:11 pmMany thanks
[...] sound like more trouble than it’s worth. Luckily for us TextMate users there’s a handy YUI Compressor TextMate bundle that makes it almost as transparent as the server-side [...]
Minimise file size with the YUI Compressor TextMate Bundle | Web Development added this pingback on Aug 26.10 at 11:48 pm[...] sound like more trouble than it’s worth. Luckily for us TextMate users there’s a handy YUI Compressor TextMate bundle that makes it almost as transparent as the server-side [...]
Minimise file size with the YUI Compressor TextMate Bundle | The best Development Tutorials added this pingback on Aug 31.10 at 2:37 pm[...] sound like more trouble than it’s worth. Luckily for us TextMate users there’s a handy YUI Compressor TextMate bundle that makes it almost as transparent as the server-side [...]
Minimise file size with the YUI Compressor TextMate Bundle | The best Tutorials added this pingback on Aug 31.10 at 3:22 pm[...] sound like more trouble than it’s worth. Luckily for us TextMate users there’s a handy YUI Compressor TextMate bundle that makes it almost as transparent as the server-side [...]
Minimise file size with the YUI Compressor TextMate Bundle | Programming Blog added this pingback on Sep 03.10 at 3:46 pm