停止递归运行PhpStorm文件监视程序(使用Autoprefixer) [英] Stop PhpStorm file watchers running recursively (with Autoprefixer)
问题描述
我有一个运行autoprefixer的PhpStorm文件监视程序.但是,文件监视程序以递归方式运行.我认为这是因为它会生成一个新的css文件,然后文件监视程序将在该文件上运行.
I've a PhpStorm file watcher running autoprefixer. However the file watcher runs recursively. I think this is because it generates a new css file which the file watcher then runs on.
有没有办法强迫它们只运行一次?
Is there a way to force them to run only once?
我认为我需要一个Project文件范围,因为我没有直接编辑css文件,而是有一个SCSS文件,该文件创建了一个CSS文件,然后应为该文件自动添加前缀.我的设置如下所示.
I think I need a scope of Project files because I am not directly editing the css file, instead I have a SCSS file that creates a CSS file which should then be auto prefixed. My settings are shown below.
推荐答案
您必须:
- 创建自定义范围(
Settings | Scopes
..或通过单击File Watcher中相应的"..."按钮); - [可选地]包括所需的文件(例如
*.css
)-并不是真正需要的,因为File Watcher的文件类型"字段已经覆盖了该文件 - 排除已修改的文件(
*.min.css
)
- create custom scope (
Settings | Scopes
.. or by clicking on corresponding "..." button in File Watcher); - [optionally] include desired files (e.g.
*.css
) -- not really required as "File Type" field of File Watcher already covers it - exclude already modified files (
*.min.css
)
现在在File Watcher中使用该范围,而不是默认的"Project Files"
Now use that scope in your File Watcher instead of default "Project Files"
这篇关于停止递归运行PhpStorm文件监视程序(使用Autoprefixer)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!