Search code examples
csslessphpstorm

PhpStorm LESS Watcher configuration


I am using PhpStorm 8 to work on some LESS files.

variables.less gets imported from styles.less.

When I save variables.less only a variables.css is being made. How do I configure the watcher to transpile only styles.less > styles.css and automatically upload styles.css?

Here's my current config: Current watcher config http://www.bilder-upload.eu/upload/e60eb3-1432718715.jpg


Solution

    1. You need to enable Track only root files option so that only main file will be compiled.

      If it does not work -- delete your existing watcher and create new one from scratch. Here is mine (as an example -- works fine for me).

      https://i.sstatic.net/Z5sxO.png

    2. For automatic upload (deployment) -- have a look at the official manual: https://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm

      If configured correctly but it still does not work -- it's possible (quite likely) that your Output paths to refresh is not pointing to a correct file (after File Watcher execution IDE does not re-read whole project looking for changes -- only files pointed here).