Reputation: 7882
I'm working on a project (by myself, and in two different machines) where I'm using Gulp, and the gulpfile has two main goals - generate the build (default task) and compile SASS to CSS, within the /app (source) folder.
Any advice on avoiding people (me included) to update a .css file that would be eventually overwritten by a compiled .scss file with gulp-watch?
I'm also using Git and recently I lost some changes I've made to a CSS file for that reason. I'm not sure what happened, but when I merged commits, some CSS was lost and I had to look for it in previous commits. No big deal, and it was actually my fault, because I made some commits without checking out the origin, and then pushed them.
A part from the CSS issue, does it sounds like a good workflow? It feels good to work with that level of organisation and make profit of Sass, Gulp and Git, but sometimes it feels I'm making things too complex, not sure if that's the case, or if I'm doing something wrong or if it's just a matter of familiarisation.
Upvotes: 1
Views: 935
Reputation: 91193
First of all, if you are using SCSS, why are you editing CSS files?
I would recommend adding your CSS files to .gitignore
so that they are not committed and only commit your scss
files. You just have to remember to use gulp to generate new css
files whenever you checkout your repo into a fresh project.
As far as, keeping people (including you) from editing a css
file... just don't do it. You and anyone else familiar with a project should know that your css
is overwritten by scss
compiling.
Upvotes: 3