Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
sveltedoc-parser
Advanced tools
Generate a JSON documentation for a Svelte file
Changelog of release versions can be found here
npm install --save sveltedoc-parser
@public
, @protected
, @private
@type {string}
) or parse default value if is not providedfire(...)
methodprivate
visibility scopeslots
@param {string} parameter
)@param [parameter]
), Google Closure Compiler syntax supported as well (@param {string=} parameter
)@param [parameter=Default value]
)json Path | Description | Default value |
---|---|---|
filename | The filename to parse. Required, unless fileContent is passed. | |
fileContent | The file content to parse. Required, unless filename is passed. | |
encoding | The file encoding. | utf8 |
features | The component features to parse and extracting. | By default used all supported features (see below). |
ignoredVisibilities | The list of ignored visibilities. | ['private', 'protected'] |
'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.Output format are described at this document.
See example of output here presented in JSON format for this component.
const sveltedoc = require('sveltedoc-parser');
const options = {
filename: 'main.svelte'
};
sveltedoc.parse(options)
.then(componentDoc => {
console.log(componentDoc);
})
.catch(e => {
console.error(e);
});
All list of known issues presented at this page.
Found a new issues? Please contribute and write detailed description here.
Author Alexey Mulyukin
Based on vuedoc-parse
FAQs
Generate a JSON documentation for a Svelte file
The npm package sveltedoc-parser receives a total of 71,799 weekly downloads. As such, sveltedoc-parser popularity was classified as popular.
We found that sveltedoc-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.