Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task Sass not watching scss partials. #38

Closed
yaroslavthedev opened this issue Oct 18, 2019 · 4 comments · Fixed by #40
Closed

Task Sass not watching scss partials. #38

yaroslavthedev opened this issue Oct 18, 2019 · 4 comments · Fixed by #40
Assignees
Projects
Milestone

Comments

@yaroslavthedev
Copy link

Changes only applies when save main scss file.
Other files with underscore (_partials.scss) not watching.

@jr-cologne
Copy link
Owner

Hi @yaroslav1994,

thank you very much for filing this issue.

Could you please provide more information about the circumstances of this potential bug?

For instance, does this behavior only apply for scss files or are other types of files affected as well?

I'm afraid, I'm unsure whether I will have the time to look into this issue in the near future.
Because of that, I am going to open this issue for Hacktoberfest contributors.

If you or anyone else has the time and knowledge needed to further investigate this bug and submit a PR to fix this, I would be really happy.

Thank you so much in advance!

Best regards,
@jr-cologne

@jr-cologne jr-cologne added this to To do in v1 via automation Oct 18, 2019
@jr-cologne jr-cologne added this to the v1 milestone Oct 18, 2019
@yaroslavthedev
Copy link
Author

Hello. After a few hours research i find that if remove this construction http://joxi.ru/DrllD4VHVwJpjr
it works fine.
I am using scss syntax but sass syntax also didnt work until i deleted this part of code.

And i am using zurb foudation sass, and there were problems too.
Didn't work includePath - http://joxi.ru/BA0OJPviMnNyo2

My fix if to place "vendor" task forward before "clear" task. http://joxi.ru/VrwnD4lC7P5lWA

@jr-cologne
Copy link
Owner

Hi @yaroslav1994,

thank you very much for the clarifications.

I quickly tested this and it indeed looks like incremental builds cause that changes are not taken over to the dist files.

Unfortunately, I'm not sure how to quickly fix this issue.
Since I don't really have the time to further look into this, I'm hoping someone from Hacktoberfest can help out here.

I'm sorry you might have to wait some time for a proper fix.
As a temporary solution, just stop using incremental builds by removing the since property entirely as you already found out that this fixes the issue.

Best regards,
@jr-cologne

@jr-cologne
Copy link
Owner

Quick update on that issue:
gulp.lastRun() does not work with Sass as we would expect since only timestamps of files without the _ in front are compared to the current timestamp which is why changes in Sass files like the partials are not reflected in the built CSS files.

We might be able to go around this issue by using a package like gulp-cache which seems to compare actual file contents.

Another option might be trying to make Gulp check timestamps of files with the underscore as well, but I'm not sure whether this is possible somehow.

v1 automation moved this from To do to Done Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants