Skip to content
This repository was archived by the owner on May 30, 2020. It is now read-only.

Commit 840dbe6

Browse files
committed
formatted return as a table. issue #35
1 parent 27dc141 commit 840dbe6

File tree

4 files changed

+105
-21
lines changed

4 files changed

+105
-21
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Quick Start
3737
// or you can run in command line
3838
$ node_modules/jsdoc/jsdoc.js \
3939
--configure node_modules/angular-jsdoc/common/conf.json \
40-
--template node_modules/angular-jsdoc/default \
40+
--template node_modules/angular-jsdoc/angular-template \
4141
--destination build/docs \
4242
--readme README.md \
4343
--recurse directives services
@@ -78,7 +78,7 @@ Quick Start
7878

7979
// or with options
8080
angularJsdoc('sample-codes', {
81-
template: 'default',
81+
template: 'angular-template',
8282
destination: 'default/docs',
8383
readme: "sample-codes/README.md"
8484
}, function(output) {
@@ -96,15 +96,15 @@ Specification
9696
- options:
9797

9898
- command: jsdoc.js command
99-
Default: node_modules/jsdoc/jsdoc.js
99+
Default: node_modules/jsdoc/jsdoc.js
100100
- configure: The path to the configuration file.
101-
Default: angular-jsdoc/common/conf.json
101+
Default: angular-jsdoc/common/conf.json
102102
- destination: The path to the output folder.
103-
Default: ./docs
103+
Default: ./docs
104104
- template: The path to the template to use
105-
Default: angular-jsdoc/default
105+
Default: angular-jsdoc/default
106106
- readme: The path to the project's README file.
107-
Default: 'README.md'
107+
Default: 'README.md'
108108
- callback: callback function with output parameter. e.g., `function(output) {console.log(output)}`
109109

110110
Tags Available
@@ -120,23 +120,23 @@ Example
120120
--------
121121

122122
- Directive: [map.js](sample-codes/ngmap/map.js) |
123-
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/default/docs/ngmap.map.html)
123+
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/angular-template/docs/ngmap.map.html)
124124
- Service: [attr2-options.js](sample-codes/ngmap/attr2-options.js) |
125-
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/default/docs/ngmap.Attr2Options.html)
125+
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/angular-template/docs/ngmap.Attr2Options.html)
126126
- Controller: [map-controller.js](sample-codes/ngmap/map-controller.js) |
127-
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/default/docs/ngmap.MapController.html)
127+
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/angular-template/docs/ngmap.MapController.html)
128128
- Filter: [custom-currency.js](sample-codes/app/custom-currency.js) |
129-
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/default/docs/app.customCurrency.html)
129+
[Output](https://rawgit.com/allenhwkim/angular-jsdoc/master/angular-template/docs/app.customCurrency.html)
130130

131131
Customization
132132
-------------
133133

134134
Currently, there are two templates built-in;
135135

136136
- default
137-
- angular-template
137+
- angular-template (Recommended)
138138

139-
To add your own template, please copy the default directory to your own, then, make your own css, js, and html files.
139+
To add your own template, please copy the `angular-template` directory to your own, then, make your own css, js, and html files.
140140
Then, run the `jsdoc.js` command with your template. e.g.,
141141

142142
$ node_modules/jsdoc/jsdoc.js \
@@ -146,7 +146,7 @@ Then, run the `jsdoc.js` command with your template. e.g.,
146146
--readme README.md \
147147
--recurse directives services
148148

149-
If you want to share your template with others, please send a pull request after adding your template directory where `default` directory is.
149+
If you want to share your template with others, please send a pull request after adding your template directory where `angular-template` directory is.
150150

151151
The following is the example of directory with explanation;
152152

angular-template/docs/ngmap.Attr2Options.html

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,19 @@ <h5>Parameters:</h5>
191191
</div>
192192
<div>
193193
<h5>Returns:</h5>
194-
<div class="param-desc"><p>filterd attributes</p></div>
194+
<table class="params">
195+
<thead>
196+
<tr><th>Type</th><th class="last">Description</th></tr>
197+
</thead>
198+
<tbody>
199+
<tr>
200+
<td class="type"><span class="param-type">
201+
Hash
202+
</span></td>
203+
<td class="description last"><p>filterd attributes</p></td>
204+
</tr>
205+
</tbody>
206+
</table>
195207
</div>
196208
</dd>
197209
</dl><dl>
@@ -229,7 +241,19 @@ <h5>Parameters:</h5>
229241
</div>
230242
<div>
231243
<h5>Returns:</h5>
232-
<div class="param-desc"><p>Google Map options</p></div>
244+
<table class="params">
245+
<thead>
246+
<tr><th>Type</th><th class="last">Description</th></tr>
247+
</thead>
248+
<tbody>
249+
<tr>
250+
<td class="type"><span class="param-type">
251+
Hash
252+
</span></td>
253+
<td class="description last"><p>Google Map options</p></td>
254+
</tr>
255+
</tbody>
256+
</table>
233257
</div>
234258
</dd>
235259
</dl><dl>
@@ -273,7 +297,19 @@ <h5>Parameters:</h5>
273297
</div>
274298
<div>
275299
<h5>Returns:</h5>
276-
<div class="param-desc"><p>events converted events</p></div>
300+
<table class="params">
301+
<thead>
302+
<tr><th>Type</th><th class="last">Description</th></tr>
303+
</thead>
304+
<tbody>
305+
<tr>
306+
<td class="type"><span class="param-type">
307+
Hash
308+
</span></td>
309+
<td class="description last"><p>events converted events</p></td>
310+
</tr>
311+
</tbody>
312+
</table>
277313
</div>
278314
</dd>
279315
</dl><dl>
@@ -323,7 +359,19 @@ <h5>Parameters:</h5>
323359
</div>
324360
<div>
325361
<h5>Returns:</h5>
326-
<div class="param-desc"><p>options converted attributess</p></div>
362+
<table class="params">
363+
<thead>
364+
<tr><th>Type</th><th class="last">Description</th></tr>
365+
</thead>
366+
<tbody>
367+
<tr>
368+
<td class="type"><span class="param-type">
369+
Hash
370+
</span></td>
371+
<td class="description last"><p>options converted attributess</p></td>
372+
</tr>
373+
</tbody>
374+
</table>
327375
</div>
328376
</dd>
329377
</dl><dl>
@@ -367,7 +415,19 @@ <h5>Parameters:</h5>
367415
</div>
368416
<div>
369417
<h5>Returns:</h5>
370-
<div class="param-desc"><p>attributes</p></div>
418+
<table class="params">
419+
<thead>
420+
<tr><th>Type</th><th class="last">Description</th></tr>
421+
</thead>
422+
<tbody>
423+
<tr>
424+
<td class="type"><span class="param-type">
425+
Hash
426+
</span></td>
427+
<td class="description last"><p>attributes</p></td>
428+
</tr>
429+
</tbody>
430+
</table>
371431
</div>
372432
</dd>
373433
</dl>

angular-template/docs/ngmap.MapController.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,19 @@ <h5>Parameters:</h5>
268268
</div>
269269
<div>
270270
<h5>Returns:</h5>
271-
<div class="param-desc"><p>latlng the location of the address</p></div>
271+
<table class="params">
272+
<thead>
273+
<tr><th>Type</th><th class="last">Description</th></tr>
274+
</thead>
275+
<tbody>
276+
<tr>
277+
<td class="type"><span class="param-type">
278+
Promise
279+
</span></td>
280+
<td class="description last"><p>latlng the location of the address</p></td>
281+
</tr>
282+
</tbody>
283+
</table>
272284
</div>
273285
</dd>
274286
</dl>

angular-template/html/class.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,19 @@ <h5>Parameters:</h5>
145145
</div>
146146
<div ht-if="func.returns">
147147
<h5>Returns:</h5>
148-
<div class="param-desc">{{ func.returns[0].description }}</div>
148+
<table class="params">
149+
<thead>
150+
<tr><th>Type</th><th class="last">Description</th></tr>
151+
</thead>
152+
<tbody>
153+
<tr ht-repeat="ret in func.returns">
154+
<td class="type"><span class="param-type">
155+
{{ ret.type && ret.type.names.join(" | ").replace(new RegExp( String.fromCharCode(60), "g" ), "&lt;") }}
156+
</span></td>
157+
<td class="description last">{{ ret.description }}</td>
158+
</tr>
159+
</tbody>
160+
</table>
149161
</div>
150162
</dd>
151163
</dl>

0 commit comments

Comments
 (0)