css – how to work with SASS/LESS in real time?

Question:

Recently I paid attention to css preprocessors like less and sass because I saw advantages in using them, but I see the need for a workflow so that the generated css is compiled automatically. At first, how is it possible to get the results of the code in real time or to automate its build?

Answer:

It depends a little on what packages you are using but I use watcher-lessc which listens for changes in files and recompiles in milliseconds.

npm install watcher-lessc
watcher-lessc -i ./css/style.less -o ./css/style.css
Scroll to Top
AllEscort