PhpStrom's SASS file watcher ignores @import-ed file in CSS generation
Hi, Community.
Let's say, I have such test.scss file:
.test {
margin: 0;
}
It is compiled into test.css. Good.
I have another test2.scss with such a code:
.test2 {
padding: 0;
}
Which is compiled into test2.css. Also good.
But, if I add @import "test"; in test2.scss, then test.css stops compiling.
Official documentation of SASS says:
If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename.
From this I can understand, that test.css must compile in any case. It's compilation can be disabled only by adding underscore in the beginnig of SCSS filename.
I've asked this question at StackOverflow and have got the advise to try native SCSS watcher. And that worked fine.
This is output of native SCSS watcher, when I change something at test.scss and save:
>>> Change detected to: <abspath>/Resources/Private/Sass/test.scss
overwrite Css/test.css
overwrite Css/test2.css
And here is output of PhpStorm's FileWatcher at same situation:
I:/Ruby200/bin/scss.bat --no-cache --update <abspath>/Resources/Private/Sass/test2.scss:../../Public/Css/test2.css --unix-newlines
overwrite ../../Public/Css/test2.css
Attached you can find screenshot of my File Watcher configuration.
Is it bug of PhpStorm or I'm doing something worng?
Attachment(s):
scss_watcher.PNG
Please sign in to leave a comment.
Hi there,
Please un-tick "Track only root files" checkbox -- it does exactly that.
http://www.jetbrains.com/phpstorm/webhelp/new-watcher-dialog.html
Thank you! As ususal, fast and helpful answer :)