From 7b4ac15ba97ad73262507c9d493f36c3238fbc37 Mon Sep 17 00:00:00 2001 From: Alexey Mulyukin Date: Fri, 9 Aug 2019 14:49:06 +0300 Subject: [PATCH] Update documentation and library version to 2.1.0 --- CHANGELOG.md | 8 ++++++++ README.md | 43 ++++++++++++++++++++++++------------------- package.json | 2 +- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5524799..472d645 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 (`` + - 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 @@ -35,9 +40,9 @@ npm install --save sveltedoc-parser - 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 @@ -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 diff --git a/package.json b/package.json index 82405f8..b9c0de2 100644 --- a/package.json +++ b/package.json @@ -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": {