sp00m / gulp-watch-sass

Watches for SASS files modifications, taking @import-ing SASS files into account.
MIT License
6 stars 2 forks source link

Inline import CSS bug #3

Closed Sylwekqaz closed 7 years ago

Sylwekqaz commented 7 years ago

I have inline import .css file (main-style.css) in my .scss file like @import "../main-style"; and sass compiles without errors, but watch task throws info about missing file Could not resolve '../main-style' from file 'C:\patch\to\file\style.scss': file not found, and watch not work on .css files

sp00m commented 7 years ago

Thanks for raising it, I'll investigate.

sp00m commented 7 years ago

@Sylwekqaz The @import statement will be fixed, but you still won't be able to watch for CSS files changes. Why would you like to watch for CSS files changes actually? Because if it's a file within your codebase, then you should probably convert it into a SCSS file, and if it's a file from an external library, then it should not change, am I wrong?

Sylwekqaz commented 7 years ago

Theoretically: you are right (maybe its will be use full on changing external library version, but its rare use case) Practically: sometimes bad things happen in projects, and there no time (money) to fix it.

sp00m commented 7 years ago

OK, I'll see what I can do. BTW, in the meantime, you can probably just rename your file from .css to .scss as SCSS is a superset of CSS:

Every valid CSS stylesheet is valid SCSS as well.

Keep you posted soon!

Sylwekqaz commented 7 years ago

Yes I know, and meantime I use this workaround before I fix problem in our project.

Thanks

W dniu śr., 26.07.2017 o 15:52 Christophe Maillard notifications@github.com napisał(a):

OK, I'll see what I can do. BTW, in the meantime, you can probably just rename your file from .css to .scss as SCSS is a superset of CSS http://sass-lang.com/documentation/:

Every valid CSS stylesheet is valid SCSS as well.

Keep you posted soon!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sp00m/gulp-watch-sass/issues/3#issuecomment-318059315, or mute the thread https://github.com/notifications/unsubscribe-auth/AHsdiumPINmf4uaHCumaQsel4rseTwpDks5sR0ShgaJpZM4OhG6V .

sp00m commented 7 years ago

This has been fixed in version 1.2.0 (you can now watch for CSS files modifications in addition to SASS ones).