Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop PhpStorm file watchers running recursively (with Autoprefixer)

Tags:

css

phpstorm

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?

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.

enter image description here

like image 448
Ric Avatar asked Jul 24 '14 14:07

Ric


1 Answers

You have to:

  • 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)

Now use that scope in your File Watcher instead of default "Project Files"

like image 95
LazyOne Avatar answered Nov 04 '22 07:11

LazyOne