Question

So, i'm building a new project with SASS and Zurb Foundation framework. I have a SASS-Compass watcher installed in my IDE (PHPStorm), to automatically detect changes and recompile everything into assets.

I have a main file, app.sass, which imports _settings.sass. My problem is, when i change some variable on my _settings.sass file, PHPStorm Watcher doesn't know that he needs to recompile my app.sass, and i have to do some changes to app.sass for it to recompile, so i could see my changes. This is kinda annoying and makes little sense.

My watcher settings are:

Program: C:\Ruby200-x64\bin\compass.bat
Arguments: compile C:/Winginx/home/project.local/public_html $UnixSeparators($FilePath$)$

So the question is, has anyone thought about this problem, and maybe have a clever workaround?

Thanks in advance.

Was it helpful?

Solution

Finally, the answer.

As it turns out - and i didn't know this - there are two kinds of imported files in SASS. Normal files, and partials. The underscore at the beginning of the name of a file shows it's a partial and shouldn't be generated into a css file. A simple test shows that while compass watcher detects changes in normal imported files and recompiles everything accordingly, it ignores partial changes, and that's why the problem with _settings.sass occured.

Hope it helps somebody.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top