- `-r`: Recurse into subdirectories of the specified source directories
- `-t`: Use template in path `docs`
- `-d`: Generated html files put in `gen/docs`
- Source files to parse are taken from directory `lib`
## Notes
The template generation is set up so that:
- Files ending in `.tmpl` are skipped
- All non-html files are plain copied
- html-files *can* contain `<?js ?>` tags, but this is not required
## Intention
The `docs` directory is treated as a `jsdoc` template, in which the html-files are the template files. This allows for a gradual adaptation of the html-files to templates; unchanged html-files will pass through `jsdoc` unchanged.
The added value of using `jsdoc` for documentation generation, is that the complete documentation information, as collected by `jsdoc` from the source, is available for usage. This way, it's possible to insert technical notes from the source code into the documentation.
----
# Usage of and Notes on Source Code
This section contains notes on the usage of `jsdoc` functionality, to aid with the handling of its generated data.
## Parameters of `publish()`
### Parameter `taffyData`
A table containing *all* data collected from the source code, related to jsdoc generation. See below for more info and example outputs.
### Parameter `opt`
Example of `opt` variable:
```js
{
"_":["../github/vis/lib/network/"],
"configure":"jsdoc.json",
"recurse":true,
"template":"/home/wim/projects/jsdoc/default",
"destination":"./out/",
"encoding":"utf8"
}
```
### Parameter `tutorial`
This does not appear to be of use for the generation of `vis.js` documentation.
Example of `tutorial` variable:
```js
{
"longname":"",
"name":"",
"title":"",
"content":"",
"parent":null,
"children":[],
"_tutorials":{}
}
```
## Global variable `env`
This contains addition info for the current execution of `jsdoc`. Example of `env` variable:
"version":{"number":"3.5.4","revision":"Fri, 04 Aug 2017 22:05:27 GMT"}
}
```
## taffyData
This is a parameter to `publish()`. It's a table containing *all* data collected from the source code, related to jsdoc generation.
I can't find any way to return a list of fields for the data items in the taffyDB docs, therefore below there are examples of items, for better understanding of usage.
Example usage:
```js
var data = taffyData;
var tmp = data().filter({name:'Label'}).get();
```
Returns an array with all items with `name === 'Label'`. Example output of one of these items, for a class:
*In these examples, block comment endings are redacted to ' * /'*
```js
{
"comment":"/**\n * A Label to be used for Nodes or Edges.\n * /",
@ -1487,7 +1505,7 @@ Thus, to get the topmost item, get the value at index 0.
</td>
</td>
<tr><tdid="event_stabilized">stabilized</td>
<tr><tdid="event_stabilized">stabilized</td>
<td>Object</td>
<td>Object</td>
<td>Fired when the network has stabilized or when the <code>stopSimulation()</code> has been called. The amount of iterations it took could be used to tweak the maximum amount of iterations needed to stabilize the network. Passes an object with properties structured as:
<td>Fired when the network has stabilized, when the amount of iterations defined in the options has been reached, or when the <code>stopSimulation()</code> has been called. The amount of iterations it took could be used to tweak the maximum amount of iterations needed to stabilize the network. Passes an object with properties structured as:
<td>If true, range of all items in the Timeline is draggable without being selected. If false, range is only draggable for the selected item(s). Only applicable when option <code>itemsAlwaysDraggable.item</code> is set <code>true</code>. </td>
<td>If true, range of all items in the Timeline is draggable without being selected. If false, range is only draggable for the selected item(s). Only applicable when option <code>itemsAlwaysDraggable.item</code> is set <code>true</code>. </td>
</tr>
</tr>
<tr>
<td>loadingScreenTemplate</td>
<td>function</td>
<td>none</td>
<td>A template function used to generate the timeline initial loading screen. See section <ahref="#Templates">Templates</a> for a detailed explanation.</td>