Ubuntu – How do i install less css compiler

command linecompilercsslessnpm

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.

Best Answer

  • 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