grass
grass copied to clipboard
Any plan to add load_paths support when import path with `css`, `scss`, `sass` file extensions
I really like your grass project, I have previously used this library for some of my command line tools that deal with scss, with good results. In my recent project, I have some dependent code that uses @import "theme.scss"
or @import "theme"
to import scss files under load_paths
.
However, when I try to use grass, I find that the former always fails to import.
I browsed through the source code and found that find_import
function handles paths with scss
, sass
, css
file extensions differently than paths without extensions, and that the former one does not attempt to use load_paths in the current version and has been marked as a TODO.
https://github.com/connorskees/grass/blob/f7f620e44d8655aac3514677f2d2dc6974f9d918/crates/compiler/src/evaluate/visitor.rs#L836C35-L836C35
// todo: consider load paths
Are there any plans to add this feature in the near future?
Ah, thank you for mentioning that todo. I'm surprised it's still around. I am currently interviewing and travelling, but I will have time to take a look at this in mid December. It should be fairly straightforward, but there are probably a few interesting test cases to write.