Writing documentation
To write your documentation as best as possible, you can use pretty much all the docblock tags that you want.
However, to generate the docmap, we only take these specifics tags:
id
: The if of the current doc. Build like so:${namespace}.${name}
.name
: The name of your function/class/etc... requiredas
A human readdable version of thename
to use in your UI.namespace
: A namespace under which to store this doc element in the docmap requiredtype
: The type of what you are documenting like "function", "class", "string", etc...menu
: A special tag to create menus inside the docmap. This is documented in this documentationdefault
: The default value of what you are documenting like "true", "something", etc...platform
: The platform on which your item will run like "node", "browser", "php", etc...description
: The description of your itemstatus
: The status of your item like "alpha", "beta", "stable", etc...example
: An example of how to use your iteminterface
: A relative path of where to find the associated SInterface interface definition file.async
: Define if your item is async or notstatic
: Define if your item is static of notsince
: Define from when this item is available like "2.0.2", "1.2.3", etc...author
: Define which if the author of this item
These tags are the one that will be written in the docmap. This does not mean that you cannot use other tags inside your docblocks. They just wont be listed inside the docmap.
To add some tags inside your docmap, simply add id to the configuration array under the
config.docmap.build.tags
namespace.
Example
Here's a real life example to illustrate how to write nice documentation.
This example is the documentation of the querySelectorLive
DOM function