Members
(static) root :module:jsdoc/tutorial.Root
Root tutorial.
Type:
- module:jsdoc/tutorial.Root
- Source:
Methods
(static) addTutorial(current)
Add a tutorial.
Parameters:
Name | Type | Description |
---|---|---|
current |
module:jsdoc/tutorial.Tutorial | Tutorial to add. |
- Source:
(static) load(filepath)
Load tutorials from the given path.
Parameters:
Name | Type | Description |
---|---|---|
filepath |
string | Tutorials directory. |
- Source:
(static) resolve()
Resolves hierarchical structure.
- Source:
(inner) addTutorialConf(name, meta)
Helper function that adds tutorial configuration to the `conf` variable.
This helps when multiple tutorial configurations are specified in one object,
or when a tutorial's children are specified as tutorial configurations as
opposed to an array of tutorial names.
Recurses as necessary to ensure all tutorials are added.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | if `meta` is a configuration for a single tutorial, this is that tutorial's name. |
meta |
object | object that contains tutorial information. Can either be for a single tutorial, or for multiple (where each key in `meta` is the tutorial name and each value is the information for a single tutorial). Additionally, a tutorial's 'children' property may either be an array of strings (names of the child tutorials), OR an object giving the configuration for the child tutorials. |
- Source:
(inner) isTutorialJSON(json) → {boolean}
checks if `conf` is the metadata for a single tutorial.
A tutorial's metadata has a property 'title' and/or a property 'children'.
Parameters:
Name | Type | Description |
---|---|---|
json |
object | the object we want to test (typically from JSON.parse) |
- Source:
Returns:
whether `json` could be the metadata for a tutorial.
- Type
- boolean