Skip to content

Commit 30d407b

Browse files
committed
another example.. update readme
1 parent 8555a62 commit 30d407b

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Output:
8989
]
9090
```
9191

92-
Finally, use the `render()` method to invocate jsdoc directly, generating your documentation.
92+
Finally, use the `render()` method to invocate jsdoc directly, generating your documentation. See the [example folder](https://github.com/jsdoc2md/jsdoc-api/tree/master/example) for code examples.
9393

9494
```js
9595
import jsdoc from 'jsdoc-api'

example/render-source.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import jsdoc from 'jsdoc-api'
2+
3+
const source = [
4+
`import Foo from "foo"
5+
/**
6+
* FooPrime is some child class
7+
* @class
8+
* @param {Object} - an input
9+
* @extends Foo
10+
*/
11+
function FooPrime() {}
12+
export default FooPrime
13+
`,
14+
`import Foo from "foo"
15+
/**
16+
* FooSecond is some other child class
17+
* @class
18+
* @param {Object} - an input
19+
* @extends Foo
20+
*/
21+
function FooSecond() {}
22+
export default FooSecond
23+
`]
24+
25+
await jsdoc.render({ source, destination: 'source-output' })

0 commit comments

Comments
 (0)