0

i) Could an inheritance hierarchy be implemented in a template?

ii) The templates I have seen all list methods alphabetically, could they be listed in the same order as in the source code? (I appreciate this is not particularly needed for ES5, however for languages with which ES 2015 now has similar OOP semantics I think it is more or less standard.)

By way of an early e.g. of JSDoc3 generating ES 2015 docs in the wild (and to illustrate my point), https://bitbucket.org/gso/eonjs/src/ (scroll to 'Support').

user5321531
  • 2,545
  • 5
  • 21
  • 27
  • Reg i) - You can already use i.e. @extends to tag inheritance, maybe you can clarify what exactly you are missing. ii) Did you have a look at a template yet and how things are done? – SGD Apr 14 '15 at 08:10
  • I have had a quick glance at a template (though not at exactly what information is passed back from the parser as yet), would take some coding but it should be possible. There is module syntax to consider also. This is the documentation I wound up looking at... https://code.google.com/p/jsdoc-toolkit/wiki/Templates – user5321531 Apr 14 '15 at 16:27
  • Please note that this is the "old" jsdoc, consider using jsdoc3 instead - the overall process is similar but API and template engine is different. I basically just looked the the default template, copied it and tweaked it for my purposes. If you look at publish.js, you will see how it generates the menu in buildNav(). – SGD Apr 14 '15 at 17:48
  • Is there documentation for the new JSDoc3, other than the source code? – user5321531 Apr 15 '15 at 04:49
  • The documentation is at http://usejsdoc.org and pretty good for what is there, templates however seem to be missing. :-/ – SGD Apr 15 '15 at 08:17

1 Answers1

0

jsdoc3 supports es5 classes an inheritance but sometimes it depends on the template you are using. I generated an output using several templates so we can compare which is the most suitable according to one's needs: https://cancerberosgx.github.io/jsdoc-templates-demo/demo/ I will put more with time but I think this is really helpful to make a decision. Also its documented how each of them is generated. Hope it helps!

cancerbero
  • 5,662
  • 1
  • 26
  • 18