After playing around with Sass for the first time, I noticed that it leaves a directory .sass-cache
behind in my working directory. I don't seem to be able to use the files inside it (in the hashed subdirectories), so what is this directory for?
Can I use it as a VCS, of sorts? Is it safe to delete?
From the Docs:
Sass caches parsed documents so that they can be reused without parsing them again unless they have changed.
It just makes compiling faster. If you delete them they will just be generated again the next time you compile.
Sass caches parsed documents so that they can be reused without parsing them again unless they have changed.
Allowing caches to be saved will make help sass compile faster, however if they offend your perfect workspace (like mine), there is a few ways around it.
LOCAL ONLY: For some people the main annoyance of the sassc files is that you might not want them on the live server. If this is the case, you can set filters in most FTP programs (on the local side) to ignore the sass cache directories. (FileZilla can have two separate filters for each view running at the same time, however this will disable directory comparison).
CHANGE CACHE LOCATION: When running sass from the command line use the argument below to change the cache location so it isnt in your way!
--cache-location PATH
DISABLE CACHE: If cache really bothers you, sass provides an argument to stop caching
--no-cache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With