问题描述
我正在使用PhpStorm 8处理一些LESS文件.
I am using PhpStorm 8 to work on some LESS files.
variables.less
从styles.less
导入.
当我保存variables.less
时,只会生成一个variables.css
.如何将观察者配置为仅转播styles.less > styles.css
并自动上传styles.css
?
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
?
这是我当前的配置:当前观察者配置http://www.bilder -upload.eu/upload/e60eb3-1432718715.jpg
推荐答案
-
您需要启用
Track only root files
选项,以便仅编译主文件.
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://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm
For automatic upload (deployment) -- have a look at the official manual: https://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm
如果配置正确,但仍然无法正常工作-Output paths to refresh
很有可能没有指向正确的文件(在File Watcher执行IDE之后,IDE不会重新读取整个项目以寻找更改)仅指向此处的文件.)
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).
这篇关于PhpStorm LESS Watcher配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!