Friday, May 2, 2014

Install Less On Ubuntu (Tutorial)


http://lesscss.org/


Here is the tutorial on how to intall Less on Ubuntu. Just simply follow the below steps and you’ll be running in no time.
First we need Node:
 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
 sudo make install
 node -v
Now let’s get NPM (which we’ll use to install LESS)
 curl http://npmjs.org/install.sh | sudo sh
 npm -v
And now LESS
 npm install less
Finally, we’ll need to update our PATH to LESS
 gedit ~/.bashrc
and add the line
 PATH=$PATH:$HOME/node_modules/less/bin
now save your bash file and reload
 source ~/.bashrc
And that’s it. You should now be able to invoke LESS from the terminal window like so:
 lessc LESSFILE.less > CSSFILE.css
(if you receive an error running LESSC you will need to correct the path to LESS. Locate the less/bin directory inside your node modules folder, and replace the path relative to the home directory eg (PATH=$PATH:$HOME/your/node/modules/less/bin) in bash.rc and reload)

If you get an error like this:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 85 0 85 0 0 162 0 --:--:-- --:--:-- --:--:-- 634
sh: 2: Syntax error: newline unexpected
try this command " curl -k https://npmjs.org/install.sh | sudo sh"

my source click this link