How to install the LESS css command line compiler and YUI Compressor on Ubuntu

LESS extends css with dynamic behavior, and is a great way to maintain a large css codebase. It can be compiled to css using a command line compiler, or rendered as css in the client by modern browsers.

The YUI compressor is used to minify both javascript and css files. This makes your files smaller, so that less bandwidth is used when they are sent to the client.

You can install both on your Ubuntu by ssh’ing to your Pod, and running this command:

root@mypod:~# sudo apt-get install node-less yui-compressor

If you have a less file, you can now try that these applications have installed by compiling a less file and minifying it.

root@mypod:~# lessc example.less > compiledExample.css
root@mypod:~# yui-compressor -o compiledExample.min.css compiledExample.css

You can learn more about LESS CSS and the YUI Compressor on their respective web sites.

Matthew McCaffrey

Leave a Reply