Rabu, 24 Desember 2014

How to Install LESS CSS Compiler on Ubuntu Using Node NPM Install

LESS is an excellent css compiler that makes life a lot easier. However, installing it on ubuntu means jumping through a few hoops in order to get the most up to date version.

It is straight forward however, so here's the steps..


sudo apt-get update
sudo apt
-get install git-core curl build-essential openssl libssl-dev
git clone https
://github.com/joyent/node.git
cd node
./configure 
 
make 
(This will take a while!)
 
sudo make install
node
-v (test it works)

Now Download NPM, which we'll use to install LESS

 
curl https://www.npmjs.com/install.sh | sudo sh
npm
-v
npm install less

 

echo "PATH=$PATH:$HOME/node/node_modules/less/bin" >> ~/.bashrc 
source
~/.bashrc
 
You should now be able to invoke LESS from the terminal window like so:

lessc LESSFILE.less > CSSFILE.css