unic / estatico

[DEPRECATED] Estático – Static site generator for frontend unicorns
Other
121 stars 18 forks source link

CSS: Dependency Graph not working with imports in modules #50

Closed swey closed 6 years ago

swey commented 7 years ago

I want to use imports inside the module scss files, which does not work well with the current dependency graph implementation. Example scenario:

source/assets/css/main.scss:

@import "../../modules/somethingcomplex/somethingcomplex"

modules/somethingcomplex/somethingcomplex.scss:

@import "partials/a"
@import "partials/b"
@import "partials/c"

(I don't want to add those imports to the main.scss because that file only should need one "entry point" per module.)

Any ideas how to modify the gulp watch task? Thank you!

swey commented 7 years ago

I invested some more time to figure out how the dependency graph is working. While trying different stuff I also figured out that disabling the dependency graph is fastening the things up. Yes, even if all CSS files are compiled on every change.

Probably because compiling dev.scss and preview/main.scss is faster than parsing the contents of the main.scss and checking all imports every time.

Of course the things could change again as soon more entry points are used.

backflip commented 6 years ago

@swey, the new dependency graph implementation should take care of this by testing every match with