Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

SCSS/SASS - what is your workflow?

Started by Muut Archive 10 years ago · 8 replies · 632 views
10 years ago

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?

10 years ago

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

10 years ago

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

10 years ago

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.

10 years ago

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.

10 years ago

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.

10 years ago

@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:

BASH
# Grav Specific
.sass-cache
composer.lock
cache/*
assets/*
logs/*
images/*
user/data/*
user/pages/*
user/localhost/config/security.yaml

# OS Generated
.DS_Store*
ehthumbs.db 
Icon?
Thumbs.db
*.swp

What do you guys think on this setup?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1368 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago