-
Notifications
You must be signed in to change notification settings - Fork 24
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
Browser support #265
Browser support #265
Conversation
8de09a1
to
f70e8de
Compare
@jmatsushita please could you take a look at this PR and see if it fits the bill? I think a solution like this would solve #209, #218, and #259. |
Current coverage is 99.30% (diff: 100%)@@ master #265 diff @@
==========================================
Files 12 12
Lines 266 288 +22
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 264 286 +22
Misses 2 2
Partials 0 0
|
f70e8de
to
6e02688
Compare
Could you document the |
Also, for non-browser implementations, it would be great to be able to rely on the default implementation of My use case is where I want to be able to handle some custom links, but also support the base feature of including files via paths. It doesn't seem possible to get a handle on the exported resolveLink function in |
@Ramblurr I'll absolutely add documentation before the branch merges, just haven't had a chance yet. In this first version I hadn't really planned on supporting extending the base implementation, but perhaps I should reevaluate. |
@jamesramsay Cool! Another piece of feedback, it doesn't seem to work with nested transcludes. I wrote a simple Is this a bug or intended? |
@Ramblurr that's a bug. I'll be sure to add a test for that 😉 |
Awesome! I am stoked for this feature, it will really allow for some great opportunities (Such as #270) Another possibility is some short-hand notation for api blueprint projects. For example we include our JSON body's with a transclude But yea, having nested transcludes working is a must. BTW, I simply added |
67cc9d4
to
5089e17
Compare
Any updates on this issue? We're using our own forked hercule right now because we need access to the link resolver. Note that we aren't even using hercule in the browser, we just wanted to write our own extensions to the transclude syntax to support shortcuts and other processing. |
@Ramblurr sorry for the lack of updates. It had really fallen off my radar. I'll try to dust this off and publish an MVP without browser considerations in the near future. |
5089e17
to
e7f9f42
Compare
@Ramblurr I split out the portion not related to browser support and released it in v3.1.0. I haven't added documentation yet because I want to clean up the API make it easier to use first. |
@Ramblurr I realised I never left a comment to let you know hercule 4.x has a documented API for custom resolvers. Feel free to open an issue if you have any questions! |
Closing this PR due to age. Latest release could be used in browser with a custom resolve. |
Requires a custom
resolveLink
function to be provided which is responsible for handling link inflation.