xzyfer / sass-graph

Parses import dependencies from a directory of sass files
MIT License
76 stars 59 forks source link

includePaths to resolve import path #87

Closed davidcazalis closed 7 years ago

davidcazalis commented 7 years ago

Hi there. I don't know if it's an issue, but it could be nice to have an includePaths option, like node-sass.

In my case, I have to import sass files from some modules, in my node_modules folder, but sass-graph seems to not detect them at all.

In this exemple, I have :

@import "lib/foo";
@import "foo-module/foo"; // In ./node_modules/foo-module/foo.scss

But sass-graph only detect the file in lib/foo. Not the file in node_modules/foo-module, which isn't a surprise, because it have no way to detect that foo-module/foo.scss is in my node_modules folder.

Could we have an elegant solution for this case, or I am it doing wrong ?

Awesome project btw, save me hours of headache.

xzyfer commented 7 years ago

This module is used by node-sass' watcher. We have an equivalent to includePaths called loadpaths.