-
Notifications
You must be signed in to change notification settings - Fork 18
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
Callbacks as plugins #116
Comments
Hey, sorry for the delay on this one. I was trying to think about your use case a bit. I'm hesitant to add more types of plugins unless it's really necessary. I'm a little worried about the configuration becoming too tedious or error prone. Regarding the example you gave, is I was hoping that passing the relative path of the file to each plugin would be enough since this package is generally used in the postprocess step and Let me know what you're thinking and we can likely work something out for this use case. |
I was able to work around my issue -- not by using a relative path, but by just not doing sprites altogether 😝 Data URIs work just as well for me, and we got a different PostCSS plugin working to handle that instead. |
Glad to hear you were able to find a work around! Thanks for following up on this issues. Cheers. |
I have another request/proposal!
One thing that I've come across (rarely) is the need to configure a PostCSS plugin with information about the current directory of the files being operated on. Specifically, I've run into this with
postcss-sprites
and the need to locate the sprites themselves. Brococli makes this a bit tough, since you don't actually know where the files are on disk anymore.We solves this issue by allowing a
plugin
to be a callback, that was threaded the output directory and the current file being processed. You can check out the code we've used here.Would you be willing to consider a third type of plugin, a
callback
, in addition to the two methods supported here? Again, I'll add the feature (and tests) if you're willing to accept a PR that added that feature.Thanks!
The text was updated successfully, but these errors were encountered: