You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The "source" set of options, in combination with paths given to JSDoc on the command-line, determine what files JSDoc generates documentation for.</p>
61
+
<p>The "source" set of options, in combination with paths given to JSDoc on the command-line, determine what files JSDoc generates documentation for. (Remove the comments before adding this example to your own .json file.)</p>
description: 'A quick-start guide to getting up and running with JSDoc 3.'
5
-
}-->
6
-
<h3>Getting Started</h3>
7
-
8
-
<p>
9
-
JSDoc 3 is an API documentation generator for JavaScript, similar to JavaDoc or PHPDoc. You add documentation comments directly to your source code, right along side the code itself. The JSDoc Tool will scan your source code, and generate a complete HTML documentation website for you.
10
-
</p>
11
-
12
-
<h3>Adding Documentation Comments to Your Code</h3>
13
-
14
-
<p>
15
-
JSDoc's purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like: namespaces, classes, methods, method parameters, etc.
16
-
</p>
17
-
18
-
<p>
19
-
JSDoc comments should generally be placed immediately before the code being documented. It must start with a <code>/**</code> sequence in order to be recognized by the JSDoc parser. Comments beginning with <code>/*</code>, <code>/***</code>, or more than 3 stars will be ignored. This is a feature to allow you to suppress parsing of comment blocks.
20
-
</p>
21
-
22
-
{{#example}}The simplest documentation is just a description.
23
-
/** This is a description of the foo function. */
24
-
function foo() {
25
-
}
26
-
{{/example}}
27
-
28
-
<p>
29
-
Adding a description is simple, just type the description you want in the documentaton comment.
30
-
</p>
31
-
32
-
<p>
33
-
Special "documentation tags" can be used to give more information. For example, if the function is a constructor, you can indicate this by adding a tag.
34
-
</p>
35
-
36
-
{{#example}}Use a documentation tag to describe your code.
37
-
/**
38
-
Represents a book.
39
-
@constructor
40
-
*/
41
-
function Book(title, author) {
42
-
}
43
-
{{/example}}
44
-
45
-
<p>
46
-
More tags can be used to add more information. See the Tag Dictionary for a complete list of tags that are recognized by JSDoc 3.
47
-
</p>
48
-
49
-
{{#example}}Adding more information with tags.
50
-
/**
51
-
Represents a book.
52
-
@constructor
53
-
@param {string} title - The title of the book.
54
-
@param {string} author - The author of the book.
55
-
*/
56
-
function Book(title, author) {
57
-
}
58
-
{{/example}}
59
-
60
-
<h3>Generating A Website</h3>
61
-
62
-
<p>
63
-
Once your code is commented, you can use the JSDoc 3 Tool to generate an HTML website from the source.
64
-
</p>
65
-
66
-
<p>
67
-
By default, JSDoc will use the "default" template to turn the documentation data into HTML. You can edit this template to suit your own needs, or create an entirely new template if that is what you prefer.
68
-
</p>
69
-
70
-
{{#example}}Running the documentation generator on the command line.
71
-
./jsdoc book.js
72
-
{{/example}}
73
-
74
-
<p>
75
-
This command will create a folder named "out" in the current working directory. Within that you will find the generated HTML pages.
1
+
<!--{
2
+
title: 'Getting Started with JSDoc 3',
3
+
out: 'about-getting-started.html',
4
+
description: 'A quick-start guide to getting up and running with JSDoc 3.'
5
+
}-->
6
+
<h3>Getting Started</h3>
7
+
8
+
<p>
9
+
JSDoc 3 is an API documentation generator for JavaScript, similar to JavaDoc or PHPDoc. You add documentation comments directly to your source code, right along side the code itself. The JSDoc Tool will scan your source code, and generate a complete HTML documentation website for you.
10
+
</p>
11
+
12
+
<h3>Adding Documentation Comments to Your Code</h3>
13
+
14
+
<p>
15
+
JSDoc's purpose is to document the API of your JavaScript application or library. It is assumed that you will want to document things like: namespaces, classes, methods, method parameters, etc.
16
+
</p>
17
+
18
+
<p>
19
+
JSDoc comments should generally be placed immediately before the code being documented. It must start with a <code>/**</code> sequence in order to be recognized by the JSDoc parser. Comments beginning with <code>/*</code>, <code>/***</code>, or more than 3 stars will be ignored. This is a feature to allow you to suppress parsing of comment blocks.
20
+
</p>
21
+
22
+
{{#example}}The simplest documentation is just a description.
23
+
/** This is a description of the foo function. */
24
+
function foo() {
25
+
}
26
+
{{/example}}
27
+
28
+
<p>
29
+
Adding a description is simple, just type the description you want in the documentaton comment.
30
+
</p>
31
+
32
+
<p>
33
+
Special "documentation tags" can be used to give more information. For example, if the function is a constructor, you can indicate this by adding a tag.
34
+
</p>
35
+
36
+
{{#example}}Use a documentation tag to describe your code.
37
+
/**
38
+
* Represents a book.
39
+
* @constructor
40
+
*/
41
+
function Book(title, author) {
42
+
}
43
+
{{/example}}
44
+
45
+
<p>
46
+
More tags can be used to add more information. See the Tag Dictionary for a complete list of tags that are recognized by JSDoc 3.
47
+
</p>
48
+
49
+
{{#example}}Adding more information with tags.
50
+
/**
51
+
* Represents a book.
52
+
* @constructor
53
+
* @param {string} title - The title of the book.
54
+
* @param {string} author - The author of the book.
55
+
*/
56
+
function Book(title, author) {
57
+
}
58
+
{{/example}}
59
+
60
+
<h3>Generating A Website</h3>
61
+
62
+
<p>
63
+
Once your code is commented, you can use the JSDoc 3 Tool to generate an HTML website from the source.
64
+
</p>
65
+
66
+
<p>
67
+
By default, JSDoc will use the "default" template to turn the documentation data into HTML. You can edit this template to suit your own needs, or create an entirely new template if that is what you prefer.
68
+
</p>
69
+
70
+
{{#example}}Running the documentation generator on the command line.
71
+
./jsdoc book.js
72
+
{{/example}}
73
+
74
+
<p>
75
+
This command will create a folder named "out" in the current working directory. Within that you will find the generated HTML pages.
description: 'A guide to including a readme file in your documentation with JSDoc 3.'
5
-
}-->
6
-
<h3>Including a Readme File in Your Documentation With JSDoc 3</h3>
7
-
8
-
<p>To include a readme file in your documentation, you simply specify the location of your readme file on the command line along with the location of your source files. The readme file will be incorporated into the index.html of your documentation in the default template. The file must be written in markdown and given a .md extension.</p>
9
-
10
-
{{#example}}Including a readme file in your documentation
<p>If your file is successfully incorporated into the default template, it's content will be rendered in beautiful HTML just before the files list.</p>
1
+
<!--{
2
+
title: 'Including a Readme File With JSDoc 3',
3
+
out: 'about-including-readme.html',
4
+
description: 'A guide to including a readme file in your documentation with JSDoc 3.'
5
+
}-->
6
+
<h3>Including a Readme File in Your Documentation With JSDoc 3</h3>
7
+
8
+
<p>To include a readme file in your documentation, you simply specify the location of your readme file on the command line along with the location of your source files. The readme file will be incorporated into the index.html of your documentation in the default template. The file must be written in markdown and given a .md extension.</p>
9
+
10
+
{{#example}}Including a readme file in your documentation
<p>If your file is successfully incorporated into the default template, it's content will be rendered in beautiful HTML just before the files list.</p>
0 commit comments