Skip to content

Commit f9fde8a

Browse files
Merge branch 'master' of git://github.com/jsdoc3/jsdoc3.github.com into feature-alphabetical-tag-index
2 parents 2fa6c56 + 10245c2 commit f9fde8a

File tree

140 files changed

+9081
-4280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+9081
-4280
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Set default behaviour, in case users don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Denote all files that are truly binary and should not be modified.
5+
*.png binary
6+
*.jpg binary

Jake/articles/about-configuring-jsdoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ A <a href="#example">full example</a> is provided at the end.
5858

5959
<h2 name="configuration-file-files" id="configuration-file-files">Specifying input files</h2>
6060

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.</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>
6262

6363
{{#example}}
6464
...
@@ -109,8 +109,8 @@ myProject/
109109
{{#example}}
110110
...
111111
"source": {
112-
"include": [ 'myProject/a.js', 'myProject/lib', 'myProject/_private' ],
113-
"exclude": [ 'myProject/lib/ignore.js' ],
112+
"include": [ "myProject/a.js", "myProject/lib", "myProject/_private" ],
113+
"exclude": [ "myProject/lib/ignore.js" ],
114114
"includePattern": ".+\\.js(doc)?$",
115115
"excludePattern": "(^|\\/|\\\\)_"
116116
},
@@ -156,6 +156,7 @@ To do this, use the longnames of the relevant options in an "opts" section of co
156156

157157
{{#example}}opts
158158
...
159+
// You must remove the comments before adding these options to your .json file
159160
"opts": {
160161
"template": "default", // same as -t default
161162
"encoding": "utf8", // same as -e utf8
@@ -255,6 +256,7 @@ Example with all configuration options
255256
<p>Here is an example conf.json showing all possible configuration options native to the base JSDoc, along with their default values.</p>
256257

257258
{{#example}}A conf.json showcasing all the configuration options to base JSDoc.
259+
// You must remove the comments before adding these options to your .json file
258260
{
259261
"tags": {
260262
"allowUnknownTags": true

Jake/articles/about-getting-started

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
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.
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.
7676
</p>

Jake/articles/about-including-readme

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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
11-
jsdoc C:\path\to\my\JS\project\sourceFiles C:\path\to\my\JS\project\README.md
12-
{{/example}}
13-
14-
<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
11+
jsdoc C:\path\to\my\JS\project\sourceFiles C:\path\to\my\JS\project\README.md
12+
{{/example}}
13+
14+
<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

Comments
 (0)