Hey there folks,
I'm trying to set up a custom file watcher and I'm not able to figure out why it doesn't seem to be working. I've scoured the web for hours and just can't find anything on it.
The gist of it is this:
I want to use a web settings file (.php) to generate SCSS files (literally .scss) which would then be output to CSS. Basically, the "transpiler", if you will, takes name/value pairs from the settings file, and dumps them in as formatted scss variables into the .scss file.
This gives me the ability to manage application directories from one spot. Love it.

I wrote a powershell script that handles the creation of the .scss file from the .php and it works wonderfully. However, I haven't exported it to an .exe file (actually not sure how to do that).
My approach was to set the watcher to watch .php file changes on the directory where my web settings file lives. From there, the "program" it calls is actually powershell.exe and passes it a -file "path\to\file\" argument. The script, if run, should handle everything else on it's own. I can get the powershell call to work in a cmd prompt, which leads me to believe that intellij isn't even making the call. Intellij is running in administrator mode.

Am I wrong in thinking that intellij actually watches the file for you? Because this thing just isn't working :(

To sum up, I want this:
.php file -> on update -> copy values to .scss file (file update)

That's all. Seems simple enough, but it doesn't appear to be firing (no error or anything). The PS script is totally self-contained and requires no input, so I know that's not an issue.
I'm putting my watcher settings below. I'm starting to think I don't even understand how the file watchign system works in intellij in which case I'll just write a cmd promt watcher and run it in the background :( boooo

Thanks for any help in advance!

=====Settings below======

Setting Name Setting Value
Name App Constants to SCSS Updater
Description Takes selected App constants from the header comment @SCSSEXPORT array in Utility_Constants.php and exports them to the appVars.scss file for SCSS usage.

OPTIONS:

Setting Name Setting Value
Output Filters [none]
Show Console Always
Immediate File Synchronization Yes
Check file for syntax errors Yes
Track root only files Unavailable

WATCHER SETTINGS:

Setting Name Setting Value
File type PHP files (PHP files)
Scope Project Files
Program C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments -file "C:\PROGRA~1\wamp\www\arctic\localScript\sassUpdater.ps1"
Working Directory C:\Program Files\wamp\www\tanguer\include\class\Utility
Environment Variables [none set, none required]
Output Paths $ProjectFileDir$\css\sass\include\appVars.scss

A note on output paths: I also had it write directly to a file at one point as well with no results- at this point I'm trying the stdout version which is bringing me no luck.
I can only assume it's not even triggering since the log won't even come up like it will when the SCSS compiler runs.
Thanks!

UGH. What a waste of like 4 hours.
So it turns out there are 2 "PHP" file types you can watch, and I somehow missed the other option in the dropdown.
That made it start firing right away.
It'd be nice to be able to specify file extension... or even watch a specific file!
Anyways, got it fixed!

Hi there,

It'd be nice to be able to specify file extension... or even watch a specific file!

Easy -- just create custom scope (Settings | Scopes) and use it in File Watcher in stead of "Project Files".