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.
Asked
Active
Viewed 2.6k times
10
Najim Sujon
- 109
- 2
- 2
- 8
3 Answers
5
/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;
}
Oli
- 289,791
- 117
- 680
- 835
-
its not working. Please suggest me, which line should change in "lessc" file. i am not sure but seem something need to change in my "lessc" file. – Najim Sujon Aug 26 '15 at 15:09
-
2I don't understand what you are saying. You shouldn't need to change *anything* in the lessc file. Please edit your question to show what you see when you run the command. – Oli Aug 26 '15 at 15:27
-
2@NajimSujon What exactly do you mean by 'Not Working'? – Thomas Ward Aug 26 '15 at 15:36
2
Installation:
sudo apt install node-less
Using:
lessc source_file.less file.css
Litvinenko Sergey
- 21
- 1