Skip to content

Commit 47bc7f4

Browse files
committed
export parse() method directly
1 parent af2e69d commit 47bc7f4

6 files changed

Lines changed: 6 additions & 49 deletions

File tree

README.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +0,0 @@
1-
[![view on npm](http://img.shields.io/npm/v/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
2-
[![npm module downloads](http://img.shields.io/npm/dt/jsdoc-parse.svg)](https://www.npmjs.org/package/jsdoc-parse)
3-
[![Build Status](https://travis-ci.org/jsdoc2md/jsdoc-parse.svg?branch=master)](https://travis-ci.org/jsdoc2md/jsdoc-parse)
4-
[![Dependency Status](https://david-dm.org/jsdoc2md/jsdoc-parse.svg)](https://david-dm.org/jsdoc2md/jsdoc-parse)
5-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
6-
[![Join the chat at https://gitter.im/jsdoc2md/jsdoc2md](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jsdoc2md/jsdoc2md?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7-
8-
# jsdoc-parse
9-
Jsdoc explain out in, jsdoc2md template data out.
10-
11-
jsdoc-parse extends [jsdoc](https://github.com/jsdoc3/jsdoc) with a few features:
12-
13-
* Support for html input files (see `--html` option).
14-
* Support for new tags in the input javascript
15-
* `@category <string>`: Useful for grouping identifiers by category.
16-
* `@done`: Used to mark `@todo` items as complete.
17-
* `@typicalname`: If set on a class, namespace or module, child members will documented using this typical name as the parent name. Real-world typical name examples are `$` (the typical name for `jQuery` instances), `_` (underscore) etc.
18-
* `@chainable`: Set to mark a method as chainable (has a return value of `this`).
19-
20-
## API Reference
21-
22-
**Example**
23-
```js
24-
var jsdocParse = require('jsdoc-parse')
25-
```
26-
27-
28-
### parse(jsdocData, [options]) ⇒ Array.&lt;object&gt;
29-
**Kind**: Exported function
30-
__Params__
31-
32-
- jsdocData Array.&lt;object&gt; - jsdoc output
33-
- [options] object
34-
- [.private] boolean - Include identifier documentation marked as `@private` in the output
35-
36-
37-
38-
39-
* * *
40-
41-
&copy; 2014-16 Lloyd Brookes <75pound@gmail.com>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

es5/jsdoc-parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var transform = require('./transform');
44

5-
exports.parse = parse;
5+
module.exports = parse;
66

77
function parse(jsdocData, options) {
88
options = options || {};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jsdoc-parse extends [jsdoc](https://github.com/jsdoc3/jsdoc) with a few features
1818
* `@chainable`: Set to mark a method as chainable (has a return value of `this`).
1919

2020
## API Reference
21-
${docs.renderAll()}
21+
{{>main}}
2222

2323
* * *
2424

lib/jsdoc-parse.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
const transform = require('./transform')
33

44
/**
5-
*
65
* @module jsdoc-parse
76
* @example
87
* var jsdocParse = require('jsdoc-parse')
98
*/
10-
11-
exports.parse = parse
9+
module.exports = parse
1210

1311
/**
1412
* @param {object[]} - jsdoc output

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "jsdoc-parse2",
2+
"name": "jsdoc-parse",
33
"author": "Lloyd Brookes <75pound@gmail.com>",
44
"version": "2.0.0",
55
"description": "Jsdoc-annotated source code in, JSON format documentation out.",
@@ -18,7 +18,7 @@
1818
},
1919
"scripts": {
2020
"test": "tape test/*.js",
21-
"docs": "jsdoc2md2 -t jsdoc2md/README.md -p list --skip-heading lib/jsdoc-parse.js > README.md; echo",
21+
"docs": "jsdoc2md -t jsdoc2md/README.hbs -p list lib/jsdoc-parse.js > README.md; echo",
2222
"es5": "babel --presets babel-preset-es2015 --no-comments lib --out-dir es5"
2323
},
2424
"dependencies": {

test/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ var fs = require('fs')
66
test('api: valid json out', function (t) {
77
t.plan(1)
88
var jsdocOutput = JSON.parse(fs.readFileSync('./test/fixture/jsdoc-input.json', 'utf8'))
9-
var data = jsdocParse.parse(jsdocOutput)
9+
var data = jsdocParse(jsdocOutput)
1010
t.equal(data[0].name, 'Chainable')
1111
})

0 commit comments

Comments
 (0)