How do i install less css compiler?
-
To Install Less Compiler
sudo npm install -g less
-
To know the location of it
sudo which lessc
-
To compile ".less" File to ".css"
lessc /home/--Your LESS File Location--/File.less > /home/--Your CSS File Location--/main.css
/usr/local/bin/
should already be in your $PATH
so there's nothing to do.
Simply use lessc
like you would any other command. Here's a little snippet showing mine is installed like yours, and it parsing some LESS into CSS.
$ sudo npm install -g less
... npm installs less ...
$ which lessc
/usr/local/bin/lessc
$ lessc - <<< 'a{color:white; strong {color:black}}'
a {
color: white;
}
a strong {
color: black;
}