-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Allow users to override/replace/add resolvers and parsers #8
Conversation
Great minds think alike! I'm literally working on implementing this right now. Instead of just two options (one for files and one for urls), you'll have the ability to define any number of arbitrary resolvers. This will allow people to support any protocol they need, such as Hopefully I'll finish this tonight. |
That's great! Please keep door open for substituting our own generic resolver regardless of protocol. In my case I have a virtual filesystem within browser and I wanted to be able to resolve referenced documents from there. |
👍 That should be totally possible. I'm allowing you to completely override and/or disable any of the built-in resolvers, so you can completely disable the default functionality and substitute your own if you want. |
Once I get the code committed, I'd love your feedback. I want to make sure it's flexible enough for a variety of different use-cases. |
Sure thing! You can open PR when you're done and I'd take a look at proposed changes with pleasure. Let's close this one. |
I've just got one important thought. With overridable resolvers there has to be an option to disable caching entirely otherwise resolvers are going to work with unexpected side effects (and usually have their own caching strategies). |
Yeah, each resolver will have its own cache duration, just like the |
👍 |
Not fully done yet, but pretty close.
@xaka - I've check-in my changes (didn't bother doing a new PR). It's not fully tested yet, so I haven't released it to NPM or anything, and I haven't updated the docs yet. But feel free to take a look and give your feedback on what's there. I'm calling it a night. Will pick it back up tomorrow. |
I took a look and I think the change is reasonable, and gives enough flexibility to override the default behavior. I'm looking forward for next release in order to jump off my fork as I really need that "overridable resolvers" feature. |
Not quite done yet, but REALLY close
9693797
to
820c0b9
Compare
Finished all code changes and tests. Still need to update docs
🆙 |
🆙 I would love to see this implemented :) |
Done! This just landed in v3.0.0 |
No description provided.