chriseppstein/sass-globbing

Globbing does not work across directories

starryeyez024 opened this issue · 6 comments

If you use add_import_path to load files from another directory like this:
http://note.io/1iE4dE9

and you try to use sass-globbing to import a batch of partials from the other directory, it fails. You have to import each partial one by one.

For anyone else stuck, I found a workaround for Sass:
I created a partial in the base theme that globs in the stuff in the directory that I want: http://note.io/1u1eGhq , and then the sub theme can reference that via @import "base_elements" which now targets that partial instead of the directory.

However this solution doesn't help you import images from another directory referenced in the Sass.

I can confirm it not working when paths added with add_import_paths or additional_import_paths. The workaround of adding a partial that globs folder contents, and importing that in separately works for me.

I'm getting the same issue from the CLI:

sass -r sass-globbing --watch src/sass:assets/css --trace --load-path ./../../sass ../sass

Globbing won't work in the directory ./../../sass or any of its child directories, but importing individual files works.

👍 yeah in the same boat.

Sadly with the testing I have done, it seems sass-globbing does not respect --load-path at all? Regardless of relative and/or absolute path components given.

unn commented

Ran into this myself. Thanks for the work around @starryeyez024

It seems to have broken between 1.1.0 and 1.1.1. So rolling back the gem works as well.

Should be fixed in 1.1.3