Shrinking Javascript and CSS on Linux

Coding Fit

Small is beautiful. Shrinking Javascript and CSS by taking out the white space results in a substantial improvement in size and download speed without increasing the power needed to run it. For years I’ve used the dojo build which did it for me but since I’ve left the dojo world, I have to do it differently.

There are lots of ways to shrink files, but this is a testimonial for yui-compressor. On my Ubuntu distro it’s one of the packages known to the package manager. Install and you’re ready to go. From the command line:

yui-compressor myfile.js > myfile.min.js

If only my waistline was so easy to shrink.


View original post