I'm using SASS 3.3.8 and Compass 1.0.0.alpha.19.
In the interest of shortening SASS compile times in my project, I have split my stylesheets, @import-ing shared mixins, variables, and placeholder selectors. My project file structure looks like this:
scss/
library/
_library.scss
_section_a_widgets.scss
_section_b_widgets.scss
section_b.scss
section_a.scss
In section_a.scss, I have:
@import "library";
@import "section_a_widgets";
In section_b.scss, I have:
@import "library";
@import "section_b_widgets";
This way, when I am working on, e.g., section_a_widgets.scss, I should only have to wait for section_a.scss to compile.
For some reason when I save section_a_widgets.scss, my Compass task indicates that section_a.scss has been "overwritten" (this makes sense), but also indicates that section_b.scss is "identical". This does not make sense to me, as nothing in section_a_widgets.scss is being included in sction_b.scss, and it defeats the purpose of splitting my stylesheets because Compass needs nearly as much time to reach the conclusion that the file was identical, as it does to overwrite the file with new changes.
Does anyone have insight into where I could have gone wrong in my setup? My goal is to reach a point where when I save section_a_widgets.scss, section_a.scss would be "overwritten", but section_b.scss would be "unchanged" (indicating Compass did not bother to try to compile it).
Thanks!
So, due to the information gathered on the comments, the main issue here is that grunt-contrib-compass is executing compass through compass compile command and not through compass watch.
This means, that every time the task is executed, it will go through all your assets and process them. If they are identical, nothing will happen, but as you said, you will loose time analyzing them.
What you are looking for is compass watch, which will be executed every time a file change and only on the files that had been changed. This is useful to have as a task that is working on the background, and if you have this task active, you will get your desired results.
Notice that this will work during your work time, I mean, you have this task running, you modify your files and only the affected ones will be recompiled, and the other ones, ignored.
You have to read the documents in order to set up this environment. On their official repository page, there are some examples you can check out: check here.
Hope this helps and put you on the good track !