I just installed less css compiler using npm. Now thelesscfile directory is /usr/local/bin/lessc . i'm not clear what i need to change in lessc file and how to understand that compiler has been correctly installed.
3 Answers
To Install Less Compiler
sudo npm install -g lessTo know the location of it
sudo which lesscTo 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;
}
Installation:
sudo apt install node-less
Using:
lessc source_file.less file.css