Recompiling all Sass files


#1

Hi,
I’ve started using Sass plugin.
At first it was very cool.
I’ve created some directory ‘_common’.
Inside i’m having

fonts.scss
common.scss
form.scss

Next, i’ve imported those into main app.scss file:

@import ‘_common/font.scss’;
@import ‘_common/form.scss’;
@import ‘_common/common.scss’;

At this point all is ok, but:

I’ve created directory ‘dashboard’ with xml and scss file, and i’ve noticed that i have to import those into dashboard.scss too.

I’m having more views, and looks like all scss view files need to have this import rules ? If yes - it’s generating a problem:

I can change common/font.scss but i will not see changes in views untill i will also edit this current views scss, so i have to just add empty space for example to recompile and see changes.

This leads to issues, as other views sccs files see old value of common font.scss file untill i’ll change something - like empty space.

Now i have 10 directories with views, and i have to edit all scss files of those views just to have updated valuses from edited font.scss ??

I hope this question is not confusing, so i’'ll add some example how i’m usually working with web / html / grunt / less:

when i edit any of Less file, grunt is running and updating every less file, but in case on {N} and Sass, looks like only edited file is updated, not all Sass files ?

My example structure -

app.scss:
@import ‘_common/font.scss’;
@import ‘_common/form.scss’;
@import ‘_common/common.scss’;
@import ‘_common/helpers.scss’;
other rules

dashboard/dashboard (dashboard.scss)
@import ‘_common/font.scss’;
@import ‘_common/form.scss’;
@import ‘_common/common.scss’;
@import ‘_common/helpers.scss’;
dashboard other rules

dashboard/edit (edit.scss)
@import ‘_common/font.scss’;
@import ‘_common/form.scss’;
@import ‘_common/common.scss’;
@import ‘_common/helpers.scss’;
edit other rules

Now i can edit _common/font.scss but dashboard files will not see change untill i’ll edit for example dashboard/dashboard.scss - after this following file will be updated, but dashboard/edit.scss will have old values still, untill edit…

I think im doing this wrong, as this leads to css duplication, and other issues…