Skip to content

Commit 45b19d1

Browse files
committed
add overview docs to main export
1 parent 2781def commit 45b19d1

File tree

3 files changed

+32
-21
lines changed

3 files changed

+32
-21
lines changed

bit-docs.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,30 @@ var path = require("path");
55
/**
66
* @module {function} bit-docs-js
77
* @parent plugins
8-
* @group bit-docs-js/tags
8+
* @group bit-docs-js/tags tags
99
*
10-
* @description A collection of tags, templates, and basic styles for JavaScript applications.
10+
* @description Tags, templates, and basic styles for JavaScript.
1111
*
1212
* @param {Object} [bitDocs] The configuration object passed by `bit-docs` at runtime.
1313
*
1414
* @body
15-
*
15+
*
1616
* This plugin registers onto these hooks:
17-
* - tags
18-
* - processor
19-
* - html
17+
* - `tags`
18+
* - `processor`
19+
* - `html`
20+
*
21+
* Registering the `tag` hook adds JavaScript-related tags:
22+
* - [bit-docs-js/tags/function @function]
23+
* - [bit-docs-js/tags/param @param]
24+
* - [bit-docs-js/tags/signature @signature] (has mustache template)
25+
*
26+
* Registering the `processor` hook adds a processor for `*.js` files that gets
27+
* code comments in JavaScript files and processes them, parsing tags like
28+
* `@function` and `@param` into docObjects added to the docMap.
29+
*
30+
* Registering the `html` hook adds mustache templates used for generating the
31+
* HTML related to those tags added by this plugin.
2032
*/
2133
module.exports = function(bitDocs){
2234
// register your tags

tags/param.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
3131
}
3232
};
3333
/**
34-
* @constructor documentjs.tags.param @param
35-
* @tag documentation
36-
* @parent documentjs.tags
34+
* @module {Object} bit-docs-js/tags/param @param
35+
* @parent bit-docs-js/tags
3736
*
38-
* Adds parameter information to a [documentjs/tags/function @function] or
39-
* [documentjs/tags/signature @signature].
37+
* Adds parameter information to a [bit-docs-js/tags/function @function] or
38+
* [bit-docs-js/tags/signature @signature].
4039
*
4140
* @signature `@param {TYPE} NAME [DESCRIPTION]`
4241
* Example:
@@ -50,15 +49,15 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
5049
* findById: function( id, success ) {
5150
* @codeend
5251
*
53-
* Use `@param` within a [documentjs.tags.function @function] comment block or after
54-
* a [documentjs.tags.signature @signature] tag.
52+
* Use `@param` within a [bit-docs-js/tags/function @function] comment block or after
53+
* a [bit-docs-js/tags/signature @signature] tag.
5554
*
56-
* @param {documentjs.typeExpression} TYPE A [documentjs.typeExpression type expression].
55+
* @param {bit-docs-js/typeExpression} TYPE A [bit-docs-js/typeExpression type expression].
5756
*
58-
* Use [documentjs.tags.option @option] to detail a function's arguments or an
57+
* Use [bit-docs-js/tags/option @option] to detail a function's arguments or an
5958
* object's properties.
6059
*
61-
* @param {documentjs.nameExpression} NAME A [documentjs.nameExpression name expression].
60+
* @param {bit-docs-js/nameExpression} NAME A [bit-docs-js/nameExpression name expression].
6261
*
6362
* @body
6463
*
@@ -75,8 +74,8 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
7574
* findById: function( id, success ) {
7675
* @codeend
7776
*
78-
* ... DocumentJS will automatically
79-
* make the comment's [documentjs/DocObject DocObject] type a function
77+
* ... bit-docs will automatically
78+
* make the comment's [bit-docs-js/DocObject DocObject] type a function
8079
* and create params with just names (in this case `id` and `success`).
8180
*
8281
* The comment's `@param`s tags should use the same names as the function. Any

tags/signature.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* @constructor documentjs.tags.signature @signature
3-
* @parent documentjs.tags
2+
* @module {Object} bit-docs-js/tags/signature @signature
3+
* @parent bit-docs-js/tags
44
*
5-
* Specifies a signature for a [documentjs/tags/function @function]
5+
* Specifies a signature for a [bit-docs-js/tags/function @function]
66
* but can work with any other tag.
77
*
88
* @signature '@signature `SIGNATURE` DESCRIPTION'

0 commit comments

Comments
 (0)