registerDocumentable(<String> name, <String> label?) |
this |
Registers a new documentable type, beyond the preset ones (function,
property, etc). New documentable should also not be an already used
keyword (class, namespace, inherits, etc).
When registering new documentables, make sure that there is an appropiate
template file for it.
Set label to the text for the sections in the generated docs. |
setLeadingCharacter(<String> char) |
this |
In the rare case you don't want to use 🍂 as the leading character for
leaf directives, run this function with the desired character, e.g.
setLeadingCharacter('@');
The new leading character will apply only to files/dirs/strings parsed from
that moment on, so it's a good idea to call this before anything else. |
addDir(<String> dirname, <String[]> extensions?) |
this |
Recursively scans a directory, and parses any files that match the
given extensions (by default .js and .leafdoc , mind the dots).
Files with a .leafdoc extension will be treated as leafdoc-only
instead of source. |
addFile(<String> filename, <Boolean> isSource?) |
this |
Parses the given file using addBuffer . |
addBuffer(<Buffer> buf, <Boolean> isSource?) |
this |
Parses the given buffer using addStr underneath. |
addStr(<String> str, <Boolean> isSource?, <bar"> foo) |
this |
Parses the given string for Leafdoc comments. The string is assumed to
be source code with comments, unless isSource is explicitly set to false .
directive. |
outputStr() |
String |
Outputs the documentation to a string.
Use only after all the needed files have been parsed. |