sveltedoc-parser
sveltedoc-parser copied to clipboard
Add examples with ideal component documentation
Add few examples of what document structure can be parsed by this package
Shall I make a basic template? I do not know the full extent of sveltedoc-parser.
@TheComputerM Thanks!
One small note for your component docs
@type {button|reset|submit}
This statement means that you have types button
, reset
, submit
. However, you pass the string values for this prop, so you should write comment in the following format (just provide commas):
@type {'button'|'reset'|'submit'}
And then in output you should have following:
"type": [
{
"kind": "type",
"text": "x-small",
"type": "string"
},
{
"kind": "type",
"text": "small",
"type": "string"
},
When I use string values like you say, I get the output:
"type": [
{
"kind": "type",
"text": "'x-small'",
"type": "string"
},
{
"kind": "type",
"text": "'small'",
"type": "string"
},
Yes, this format is a correct, I'm forgot about quotes in text property
In this commit I'm prepare base for writing examples of components and parsed document structure.
Nice