how to work with SASS / LESS in real time?

3

Recently I paid attention to preprocessors of css as less and sass because I saw advantages in using them, but I see the necessity of a workflow so that css generated compiles automatically. At first, how do you get the code results in real time or automate the build of the code?

    
asked by anonymous 14.09.2017 / 14:44

2 answers

2

Depends a little on the packages you're using but I use watcher-lessc that listens for changes to files and recompiles in milliseconds.

npm install watcher-lessc
watcher-lessc -i ./css/style.less -o ./css/style.css
    
14.09.2017 / 14:46
-1

You can see a tutorial at this link:

Compiling less file gulp

If you want real-time use Sergio's tip using a watcher.

But to be in "real-time", everything will depend on your build and your development process.

Hugs!

    
14.09.2017 / 14:58