When creating a new project or upgrading an older one, should I conclude the .sass-cache directory in the repo? Since that is always changing and depends on the preprocessor to run wouldn't it be easier to ignore? What are the benefits of including the cache dirs?
Sass uses a cache system (stored in the invisible . sass-cache folder) to speed up the creation of CSS. Very occasionally, something goes wrong in Sass and Compass land. Maybe the CSS won't generate when the Sass files are saved, or perhaps the wrong styles seem to be getting generated.
Without a framework, Sass puts the cached templates in the . sass-cache directory. In Rails and Merb, they go in tmp/sass-cache . The directory can be customized with the :cache_location option.
No, you shouldn't include the directory. The general rule is to not include any files generated by some automated process from version control. Including generated files can make merging difficult, adds spurious diffs into commits, and can make your repository awkward to browse, to give a few reasons.
(There are some notable exceptions, like including db/schema.rb
or Gemfile.lock
for Rails projects.)
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