No description provided.
What sort of documentation did you have in mind?
@kossnocorp the thing is a few lines of code https://github.com/kossnocorp/jquery.turbolinks/blob/master/src/jquery.turbolinks.coffee
There's so much project ceremony for such little code.
@ericf not every person read code what he uses (I wish but it's cruel reality) and jQuery Turbolinks has very tricky behaviour. So I think is good idea to have detailed explanation how it works internally to prevent misunderstandings (monkey-patching, store callbacks in internal array and so on). /cc @rstacruz
As an exercise, I tried to refactor jQuery.Turbolinks to remove the main 'complex' things that may need documentation (IMHO), $.setReadyEvent and $.setFetchEvent. Here's how it turned out: https://gist.github.com/rstacruz/5308599
(Not saying it should be merged in, but it kinda demonstrates how much impact one feature has made to the codebase.
@rstacruz current jQuery Turbolinks realisation is very flexible and can be used not only with original Turbolinks (for example @jokklan uses it with pjax). But I think it's be better to use your implementation in v2.0.0 because this is jQuery Turbolinks, but jQuery Anything. But v1.0.0 still can be used with pjax or anywhere else. What do you think about it?
I don't have a strong stance on the issue, really. :-)
Alternate take: how about in 2.0, consider API changes that would make documentation less necessary? Here's how it is now:
Putting everything in a namespace might make things more obvious:
(Proof of concept: https://gist.github.com/rstacruz/5308759)
@rstacruz can you push this code into branch v2.0.0?