@@ -3,35 +3,51 @@ var processJavaScript = require("./process/javascript");
3
3
var path = require ( "path" ) ;
4
4
5
5
/**
6
- * @module {function} bit-docs-js
7
- * @parent plugins
8
- * @group bit-docs-js/tags tags
6
+ * @parent bit-docs-js/modules
7
+ * @module {bit-docs/types/plugin} bit-docs-js/bit-docs
9
8
*
10
- * @description Tags, templates, and basic styles for JavaScript.
11
- *
12
- * @param {Object } [bitDocs] The configuration object passed by `bit-docs` at
13
- * runtime.
9
+ * @description Register hooks to add tags, templates, and basic styles useful
10
+ * for documenting JavaScript.
11
+ *
12
+ * @signature `jsPlugin(bitDocs)`
13
+ *
14
+ * @param {Object } bitDocs Configuration object with a `register` method.
14
15
*
15
16
* @body
16
17
*
17
- * This plugin registers onto these hooks:
18
+ * ## Use
19
+ *
20
+ * Registers onto these hooks:
18
21
* - `tags`
19
22
* - `processor`
20
23
* - `html`
21
24
*
22
- * Registering the `tag` hook adds JavaScript-related tags:
23
- * - [bit-docs-js/tags/function @function]
25
+ * ### Tags
26
+ *
27
+ * Registering the `tags` hook adds JavaScript-related tags:
28
+ * - [bit-docs-js/tag/function]
29
+ * - [bit-docs-js/tags/module @module]
30
+ * - [bit-docs-js/tags/option @option]
24
31
* - [bit-docs-js/tags/param @param]
32
+ * - [bit-docs-js/tags/property @property]
33
+ * - [bit-docs-js/tags/prototype @prototype]
34
+ * - [bit-docs-js/tags/return @return]
25
35
* - [bit-docs-js/tags/signature @signature]
26
- * - ...
36
+ * - [bit-docs-js/tags/typedef @typedef]
37
+ *
38
+ * ### Processor
27
39
*
28
40
* Registering the `processor` hook adds a processor for `*.js` files that gets
29
41
* code comments in JavaScript, and processes tags like `@function` and
30
- * `@param` into docObjects that are subsequently added to the docMap.
42
+ * `@param` into [bit-docs/types/docObject]s that are subsequently added to the
43
+ * [bit-docs/types/docMap].
31
44
*
32
- * The processor is also smart enough process regular comments above functions
33
- * that have not explicitly been documented with closure type annotations, and
34
- * extracts basic signature information such as parameters and/or return type.
45
+ * Comments above functions that do not include [bit-docs-js/types/tag]s
46
+ * will still be processed as [bit-docs-js/types/tagBlock]s as the processor
47
+ * extracts basic signature information such as parameters and/or return type
48
+ * from the [bit-docs-js/types/codeLine].
49
+ *
50
+ * ### HTML
35
51
*
36
52
* Registering the `html` hook adds a mustache template used to generate the
37
53
* HTML for the tags added by this plugin.
@@ -44,5 +60,4 @@ module.exports = function(bitDocs){
44
60
bitDocs . register ( "html" , {
45
61
templates : path . join ( __dirname , "templates" )
46
62
} ) ;
47
-
48
63
} ;
0 commit comments