Managing SASS files in Git version control in Ruby on Rails

I use SASS files in Rails. And I am wondering if I should have gitignoregenerated CSS files.

The problem with adding CSS files to Git is that they are simply redundant. SASS public/stylesheets/sass's files are the files I need.

So, I have the following lines in gitignore:

# public/stylesheets/*.css

But if I do this when I click on my application on Heroku, there are no CSS files there.

  • What could be the best methods for managing SASS / CSS files?

I have never tried packing assets (like mini CSS files for a production environment), but I plan to do this when I move to an environment without Iroku with Capistrano.

+3
source share
3 answers

Here is a blog about his plugin for generating CSS from your Sass on their servers. http://blog.heroku.com/archives/2009/8/18/heroku_sass/

+2
source

My method is to keep a dedicated local branch for tracking everything that will be ported to Heroku. Your mileage may vary, but it works well for me and looks pretty organized.

+2
source

CSS Git (, Heroku), hassle gem ( sass_on_heroku ).

+1

Source: https://habr.com/ru/post/1727905/


All Articles