Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

66%
+2 −0
Q&A What would the pros and cons of storing the compiled CSS output of SASS in version control?

I follow a principle of only including in version control source code. If I can reliably generate the same output from the same input from that source code then there is no need to also store the f...

posted 3y ago by ben‭

Answer
#1: Initial revision by user avatar ben‭ · 2020-10-23T10:02:00Z (over 3 years ago)
I follow a principle of only including in version control *source code*. If I can reliably generate the same output from the same input from that source code then there is no need to also store the final build artifacts themselves.

As long as your are also storing your build configuration in source control alongside your SASS files, you should be able to reliably regenerate the CSS from any point in your project's history.

The reason I follow this approach is because it forces me to ensure that the source can be reliably built by others and isn't accidentally dependent on a local dependency anywhere. This is important in OSS but also in private repositories where there is some collaboration with other users. If my build toolchain has to build this from scratch, I've got at least some validation that others can do the same.

Another advantage is that this approach keeps my repository as **simple and lightweight** as possible but this is more relevant when dealing with large outputs and less a problem in the case of CSS.

If you do store your build output in source control, it may make deployment **much faster** since the implication is that you have already performed your build locally. If you do do this, like @r~~ recommends in their answer, you should consider automating your build step to always build before publishing changes to ensure the source and output are never out of sync.