File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Using documentation.js as a node library
2
+
3
+ You might want to do this if you're
4
+
5
+ * building an integration, like our gulp or grunt integrations
6
+ * using documentation.js's AST parsing or some other component
7
+ * mad science
8
+
9
+ Basic concepts:
10
+
11
+ * documentation.js takes an array of entry points, which can be filenames
12
+ or objects with ` source ` and ` file ` members
13
+ * generating documentation is a two-step process: parsing, in the
14
+ documentation.build and documentation.buildSync methods, and generating
15
+ output in documentation.formats.md, json, or html.
16
+
17
+ ### Example
18
+
19
+ ``` js
20
+ var documentation = require (' ./' );
21
+
22
+ var docs = documentation .buildSync ([{
23
+ source: ' /** hi this is a doc\n @name myDoc */' ,
24
+ file: ' direct.js'
25
+ }]);
26
+
27
+ documentation .formats .md (docs, {}, function (err , res ) {
28
+ console .log (res);
29
+ });
30
+ ```
You can’t perform that action at this time.
0 commit comments