codenext codenext - 3 months ago 15
Less Question

What is the equivalent of command "Compass watch" for LESS CSS pre-processor?

I was using SASS as CSS pre-processor for Drupal theme. Where in the command line if I use

$ compass watch
. It keep on watching the change in .scss file and apply to .css file.

Just I am trying Bootstrap theme and there I am using LESS CSS pre-processor, Where I have to use
$ lessc less/style.less css/style.css
every time to apply change.

What is the equivalent of
$ compass watch
for LESS.

Answer
  1. You need to install less-watch-compiler:
    npm install -g less-watch-compiler

  2. Make sure you installed less globally:
    npm install -g less

  3. In Terminal, navigate to your working directory path and run the following command:
    less-watch-compiler FOLDER_TO_WATCH FOLDER_TO_OUTPUT
Comments