I am using PyCharm and compiling CSS using Filewatcher. IDK what to do CSS is sharing with SCSS file but not compiling and Not reflecting change in Browser.
Do you mean that the watcher is not triggered when you change your .scss file?
Can you check if enabling 'Trigger watcher regardless of syntax errors' option makes any difference? if not, please try invalidating caches (File/Invalidate caches, Invalidate and restart) Note also that with 'Track only root files' option enabled the resultant .css is only created for 'main' file - no separate .css files for partials are generated
SCSS files with names prefixed with underscore are treated in a special way - they are considered partials and aren't prettified, the main .scss that includes them is processed instead. To avoid this, try adding COMPILE_PARTIAL=true variable to your file watcher settings:
Also, make sure that Track only root files is off.
Thank you for your response, adding COMPILE_PARTIAL=true worked! I still wonder how I could have solved this on my own, it does not seem to be documented. Is COMPILE_PARTIAL something that is interpreted by IDEA/WebStorm/PhpStorm? If so, I think this should be a checkbox in the interface.
Do you mean that the watcher is not triggered when you change your .scss file?
Can you check if enabling 'Trigger watcher regardless of syntax errors' option makes any difference? if not, please try invalidating caches (File/Invalidate caches, Invalidate and restart)
Note also that with 'Track only root files' option enabled the resultant .css is only created for 'main' file - no separate .css files for partials are generated
I have the same issue. I want to run Prettier on each scss file, partial or not.
My watcher is set to project files, track only root files is off, trigger regardless of syntax errors is on.
When I change a partial file, Prettier is run on the main file ...
I guess there is a need for a setting that allows a file watcher to run on the root file or on the changed file.
SCSS files with names prefixed with underscore are treated in a special way - they are considered partials and aren't prettified, the main
.scssthat includes them is processed instead. To avoid this, try addingCOMPILE_PARTIAL=truevariable to your file watcher settings:Also, make sure that Track only root files is off.
See the comments in https://youtrack.jetbrains.com/issue/WEB-13459 for explanation.
Thank you for your response, adding COMPILE_PARTIAL=true worked! I still wonder how I could have solved this on my own, it does not seem to be documented. Is COMPILE_PARTIAL something that is interpreted by IDEA/WebStorm/PhpStorm? If so, I think this should be a checkbox in the interface.
>Is COMPILE_PARTIAL something that is interpreted by IDEA/WebStorm/PhpStorm?
Yes
Thank you. Then I would like to reaffirm my feature request to make it a checkbox. Anyway, thanks a lot for your help!
I agree, this is not obvious, just spent 40 minutes trying to see what was wro g with my watchers, before finally googling and finding this.
Always google first :)