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

Checking all load paths in resolveSassPath can lead to false positives #18

Closed
kevin-smets opened this issue Mar 3, 2015 · 3 comments
Closed
Labels

Comments

@kevin-smets
Copy link

In my file I declare @import 'test';

But if test.scss is not located here, but for example in imports/test.scss

This will result in a false import statement in the graph.

Why are all load paths being checked instead of the just the one path from the import?

This also blocks me from properly resolving #16

Maybe this should not be fixed as the file will not actually compile? Still, it's rather unexpected behaviour in my opinion.

@xzyfer
Copy link
Owner

xzyfer commented Mar 5, 2015

This emulates the behaviour of Sass. Sass will attempt to resolve the import path in the cwd, then in each of the load paths until it finds a match.

@xzyfer
Copy link
Owner

xzyfer commented Mar 5, 2015

Sass looks for other Sass files in the current directory, and the Sass file directory under Rack, Rails, or Merb. Additional search directories may be specified using the :load_paths option, or the --load-path option on the command line. - Source

@xzyfer xzyfer closed this as completed Mar 5, 2015
@xzyfer xzyfer added the wontfix label Mar 5, 2015
@kevin-smets
Copy link
Author

Ah alright, quite unexpected but mirroring sass would indeed be best. I have a branch ready to test this behaviour, which would not be a bad thing, right? I'll launch the PRQ if / when #17 gets merged :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants