-
Notifications
You must be signed in to change notification settings - Fork 357
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
Support globs on the command line #616
Comments
It looks like you want to be able to pass a glob ( |
@nex3 would support for globbing become a core, built-in feature of the language or would it be handled via plugins, like Ruby Sass? |
It would be part of Dart Sass's command-line API, so... neither. |
What about a |
I've dug into this a bit. @nex3 suggested using the Dart API, the JS API, or the Embedded Sass protocol to declare a custom importer that would resolve glob statements. But, looking at the Dart Sass source, I don't see a way for an importer to say, "This In fact, the Dart Sass source has comments that explicitly instruct importers to throw an exception if an I am not fluent in Dart, and would not be surprised at all if I've missed something. But it seems like DartSass will need some changes to relax the "1 |
I should also add: I don't like globbing and I think the Sass team was right to reject it as a first-party feature years ago. But, folks use globs constantly in the config files for gulp/grunt/webpack/npm, so they have become pervasive. Also: I realize this issue is about passing input files to the CLI specifically and I'm discussing globs for |
I mentioned this in passing in another thread, but for completeness: if you wanted to support a globbing importer, you'd need to have it return the contents of a synthetic file that contained explicit imports of all the files matching the glob. |
Would be very nice to be able to do: sass "sources/scss/*/main.scss" assets/bare/ And have |
My apologies if this is off the mark as this issue is regarding command line options (and this is far from my area of expertise), but maybe my note below is of use. I have found globbing to work with Dart Sass using the |
I'm super keen to move to dart sass, but waiting for this feature before I make the jump. Hopefully it'll be available soon! 🤞 |
Is this still on the cards? Use case for me is using 11ty, I want a 'style.css' for each folder so, for example
|
Latest Sass on both Windows & OSX I get the following error
This command works fine as-is in node-sass, but errors out in dart-sass. I would expect only a warning & ignoring the (unused) parameter.
Removing the parameter works well.
Perhaps the project I'm working on is unusual; older codebase but doesn't use grunt/gulp, but uses CLI commands in package.json (which is more of a current trend).
The text was updated successfully, but these errors were encountered: