Is there a way to do file rev cache busting in SASS? It appears to be possible using compass per this answer here:
SASS Image CSS Cache Busting (via Compass)
but I haven’t found any way to do this just using SASS. Is there any way to have SASS get file modification info from the filesystem, and append to an image path?
And I’d prefer to not append query strings- rather, I think this is a better methodology.
Thanks Dawn for chiming in after all this time! I’ve since figured this out, but forgot I posted here about it.
I have a custom rb file that I reference when I run sass via the command line – like so:
in file_mod.rb, I have the following ruby function which does the trick:
Then, in a sass mixin, I simply reference the file_url function, passing it the parameters it needs to build the result:
In my case, I’m using it to construct a css background image path. Should be easily modified to suit other purposes.