PhpStorm LESS Watcher configuration

2019-03-04 09:29发布

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

1条回答
ゆ 、 Hurt°
2楼-- · 2019-03-04 09:55
  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).

    http://i.stack.imgur.com/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).

查看更多
登录 后发表回答