Skip to content

Commit

Permalink
Update documentation and library version to 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprey committed Aug 9, 2019
1 parent cd50a23 commit 7b4ac15
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ 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.1.0] 09.08.2019

- [Added] Svelte V3: Implement support for property binding parsing (`bind:proprty={...}`)
- [Added] Svelte V3: Implement support for event parsing which dispatched from code (`dispatch(...)`)
- [Added] Svelte V3: Implement support for event parsing which dispatched from markup expressions (`<button on:click="{() => dispatch(....)}">`)
- [Added] Svelte V3: Implement support for ref parsing (`bind:this={...}`)
- [Fixed] Spec: Property `SvelteDataItem.let` changed to `SvelteDateItem.kind`, that was named as `let` by mistake

## [2.0.0] 05.08.2019

- [Added] Support for V3 syntax
Expand Down
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,25 @@ npm install --save sveltedoc-parser
- Extract JS type from JSDoc (`@type {string}`) or parse default value if is not provided
- Extract computed properties with list of dependencies
- Extract list of references that attached to components or HTML elements
- Extract all fired events
- Extract information about events
- Events that propogated from child component or HTML elements `<button on:click>...</button>`
- Parse event modificators `... on:click|once`
- Extract all fired events (_Svelte 2 only_)
- Events that fired by this component by `fire(...)` method
- Events that propogated from child component or HTML elements
- Custom event handlers with `private` visibility scope
- Extract all dispatched events (_Svelte 3_)
- Events that dispatched from script block by user-created dispatcher
- Events that dispatched from markup expressions by user-created dispatcher
- Extract list of used default and named `slots`
- Extract component methods
- Extract description from JSDoc comment
- Extract parameters description from JSDoc comment
- Extract JS type from JSDoc for parameters (`@param {string} parameter`)
- Identify optional parameters (`@param [parameter]`), Google Closure Compiler syntax supported as well (`@param {string=} parameter`)
- Identify default values for optional parameters (`@param [parameter=Default value]`)
- Extract component helpers
- Extract component actions
- Extract component transitions
- Extract component helpers (_Svelte 2 only_)
- Extract component actions (_Svelte 2 only_)
- Extract component transitions (_Svelte 2 only_)
- Extract source locations for component symbols
- data
- slots
Expand All @@ -55,29 +60,29 @@ 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` |
| **version** | Optional. Use `2` or `3` to specify which svelte syntax should be used. When that is not provided, parser try to detect version of the syntax. | `undefined` |
| **defaultVersion** | Optional. Specify default version of svelte syntax, if auto-detector can't indetify correct version. | `undefined` |

### Supported feature names

- `'name'` - Extract the component name.
- `'data'` - Extract and parse the list of component data properties.
- `'computed'` - Extract and parse the list of component computed properties.
- `'methods'` - Extract the list of component methods.
- `'actions'` - Extract the list of component actions.
- `'helpers'` - Extract the list of component helpers.
- `'components'` - Extract the list of imported components.
- `'description'` - Extract the component description.
- `'events'` - Extract the list of events that fired by this component.
- `'slots'` - Extract the list of slots provided by this component.
- `'transitions'` - Extract the list of transitions used by this component.
- `'refs'` - Extract the list of references used by this component.
- `'name'` - Extract the component name (_Supported by Svelte 2 and Svelte 3_).
- `'data'` - Extract and parse the list of component data properties (_Supported by Svelte 2 and Svelte 3_).
- `'computed'` - Extract and parse the list of component computed properties (_Supported by Svelte 2 and Svelte 3_).
- `'methods'` - Extract the list of component methods (_Supported by Svelte 2 and Svelte 3_).
- `'actions'` - Extract the list of component actions (_Supported by Svelte 2_).
- `'helpers'` - Extract the list of component helpers (_Supported by Svelte 2_).
- `'components'` - Extract the list of imported components (_Supported by Svelte 2 and Svelte 3_).
- `'description'` - Extract the component description (_Supported by Svelte 2 and Svelte 3_).
- `'events'` - Extract the list of events that fired by this component (_Supported by Svelte 2 and Svelte 3_).
- `'slots'` - Extract the list of slots provided by this component (_Supported by Svelte 2 and Svelte 3_).
- `'transitions'` - Extract the list of transitions used by this component (_Supported by Svelte 2_).
- `'refs'` - Extract the list of references used by this component (_Supported by Svelte 2 and Svelte 3_).

## Output format

Output format are described at [this document](/typings.d.ts).

See example of output [here](/test/overall/overall.main.doc.json) presented in JSON format for [this component](/test/overall/main.svelte).
See example of output for Svelte 2 component [here](/test/svelte2/integration/overall/overall.main.doc.json) presented in JSON format for [this component](/test/svelte2/integration/overall/main.svelte).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sveltedoc-parser",
"version": "2.0.0",
"version": "2.1.0",
"description": "Generate a JSON documentation for a Svelte file",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7b4ac15

Please sign in to comment.