Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprey committed Aug 5, 2019
1 parent 23514d8 commit 77fba3f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ All notable changes to the "svelte-intellisense" extension will be documented in

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [2.0.0] UNRELEASED
## [2.0.0] 05.08.2019

- [Added] Support for V3 syntax

## [1.2.0] 01.02.2019

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ npm install --save sveltedoc-parser
| **features** | The component features to parse and extracting. | By default used all supported features (see below). |
| **ignoredVisibilities** | The list of ignored visibilities. | `['private', 'protected']` |
| **includeSourceLocations** | Flag, which indicates that source locations should be provided for component symbols. | `false` |
| **version** | Optional. Use 2 or 3 to specify which svelte syntax should be used. | `undefined` |
| **defaultVersion** | Optional. Specify default version of svelte syntax, if auto-detector can't indetify correct version. | `undefined` |

### Supported feature names

Expand Down Expand Up @@ -94,6 +96,20 @@ sveltedoc.parse(options)
});
```

## API

### parse(options)

Method to parse svelte component and provide doc object structure with details information.

### detectVersion(options)

Method to detect svelte syntax version

- Returns `3` when Svelte 3 special syntax feature are used
- Returns `2` when Svelte 2 special syntax feature are used
- Returns `defaultVersion` or `undefined` when specific version can't be identified

## Issues

All list of known issues presented at [this page](https://github.com/alexprey/sveltedoc-parser/issues).
Expand Down

0 comments on commit 77fba3f

Please sign in to comment.