Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Commit e726279

Browse files
authored
Updated docs
1 parent 687d4fc commit e726279

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# vue-docgen-api
1+
# vue-docgen-api (Fork)
22
[![npm](https://img.shields.io/npm/v/vue-docgen-api.svg)](https://www.npmjs.com/package/vue-docgen-api)
33

4+
**This fork adds a `parseSource` method to parse plain sources instead of files only**
5+
46
`vue-docgen-api` is a toolbox to help extracting information from [Vue][] components, and generate documentation from it.
57

68
Use [babel][] and [jsdoc-api][] to compile the code and analyze the contents of the component extracting methods and props. The output is a JavaScript object.
@@ -10,24 +12,22 @@ Use [babel][] and [jsdoc-api][] to compile the code and analyze the contents of
1012
Install the module directly from npm:
1113

1214
```
13-
npm install vue-docgen-api --save-dev
15+
npm install git://github.com/Radiergummi/vue-docgen-api --save-dev
1416
```
1517

1618
## API
1719

1820
The tool can be used programmatically to extract component information and customize the extraction process:
1921

2022
```js
21-
var vueDocs = require('vue-docgen-api');
22-
var componentInfo = vueDocs.parse(filePath);
23-
```
23+
const vueDocs = require('vue-docgen-api');
2424

25-
### parse(filePath)
26-
27-
| Parameter | Type | Description |
28-
| -------------- | ------ | --------------- |
29-
| filePath | string | The file path |
25+
// from file
26+
const componentFileInfo = vueDocs.parseFile(filePath);
3027

28+
// from source
29+
const componentSourceInfo = vueDocs.parseSource(sourceCode, filePath);
30+
```
3131

3232
## Using JSDoc tags
3333

0 commit comments

Comments
 (0)