SCSS/SASS - what is your workflow?

So I got used to SCSS and don’t imagine going back to “stone age” and repeat myself.

How do you handle SCSS? You commit the code through .git (just .scss) and then generate automatically .css files on server?

In some plugins / themes we use it. We generate the CSS locally and commit that too. When the SCSS changes, so does the CSS.

Yea either way although a good practice is to not commit files that are auto-generated (you omit them in .gitignore).

As you say, I always ignore unnecessary cache-files or development files like .sass_cache or node_modules, but I keep both .scss and .css in the version control workflow because the SASS is at any rate better organized and easier to read and the CSS is necessary for running the various environments.

But I do generate the .css on the fly (with .map.css) locally rather than server-side, because I will test any changes in styles locally before publishing. The .scss is nice to have if the locally environment ever fails, or I want to roll back changes to the styling to a previous release.

We work on our local machines/local servers and each person is working in their own branch. Then when we are ready to see the work on a live server or share it with someone remotely we will merge with the Master branch which in turn pushes everything over to our Digital Ocean staging server. So really, we are never really working on the server after the initial setup.

And the only files I typically add to gitignore are the things like cache files and htaccess. Everything else (even the .sketch designs) goes online in case someone else I’m working with needs it.

@yisraelgrimes mind to send me a link to your site?

I just realised I will need to add to .gitignore entire user/pages/*because I will be creating/modifying posts & pages directly from the admin dashboard.

My .gitignore file looks like this:

# Grav Specific

# OS Generated

What do you guys think on this setup?

@justshipit: Here’s one that we are working on. It’s actually the first Grav theme we’ve done and isn’t finished yet. So, depending on when you see the link, I can’t promise everything will be working or how it will look. haha.

Here’s our default gitignore file.,wordpress,sass,codekit


# Icon must end with two \r

### Grav CMS ###