Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I include .sass-cache with the repo when versioning a web project?

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?

like image 412
el_reverend Avatar asked Nov 20 '13 19:11

el_reverend


People also ask

What is SASS-cache?

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.

Where is SASS-cache located?

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.


1 Answers

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.)

like image 113
Ash Wilson Avatar answered Oct 02 '22 04:10

Ash Wilson