Skip to content

Commit

Permalink
Add a features section and update the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
demsking committed Oct 22, 2017
1 parent 715efef commit cf49869
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Generate a JSON documentation for a Vue file component
npm install --save @vuedoc/parser
```

## Features
- Extract the component name (from the name field of from the filename)
- Extract the component description
- Keywords Support: You can define your own keywords with the `@` symbol like `@author Sébastien`
- Extract component props
- Extract component data
- Extract computed properties with dependencies
- Extract component events
- Extract component slots
- Extract component methods

## Options
- `filename` (*required* unless `filecontent` is passed) The filename to parse
- `filecontent` (*required* unless `filename` is passed) The string to parse
Expand Down Expand Up @@ -84,6 +95,27 @@ This will print this JSON output:
]
}
],
"data": [
{
"visibility": "public",
"description": null,
"keywords": [],
"value": null,
"name": "initialValue"
}
],
"computed": [
{
"visibility": "public",
"description": null,
"keywords": [],
"value": [Object],
"name": "id",
"dependencies": [
"initialValue"
]
}
],
"slots": [
{
"name": "label",
Expand Down
10 changes: 9 additions & 1 deletion test/fixtures/checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ export default {
},
data () {
return {}
return {
initialValue: null
}
},
computed: {
id () {
return `checkbox-${this.initialValue}`
}
},
created () {
Expand Down

0 comments on commit cf49869

Please sign in to comment.