Configure File Watcher to compile LESS in PhpStorm 6 or WebStorm 6

Hi! In this short article I will provide you how to configure a File Watcher to compile LESS files in PhpStorm 6 or WebStorm 6.

So, first let’s install lessc. It’s a compiler for the LESS CSS meta-language.

sudo apt-get install lessc

Then open the Project Settings of IDE and find File Watchers there. Then add new Watcher by pressing plus icon and choose LESS. As a Program set /usr/bin/lessc or in your case you can find out the lessc path with the command whereis lessc.

phpstorm6-less-watcher-settings

After the configuring the File Watcher you may start to edit LESS files and you’ll get them compiled to CSS immediately.