Installing Node.js and Less and using Less to statically compile .less files
Last updated:HEADS-UP for more information on how to install and/or upgrade node and npm, see Upgrade NodeJs on Ubuntu using NPM
install node.js
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs npm
install less:
$ sudo npm install -g less
compile a less
file into a css
file: (statically so you can serve the .css file itself)
$ lessc styles.less > styles.css
N.B.: -x
option passed to command lessc
outputs the css in minified form