Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples with ideal component documentation #25

Open
alexprey opened this issue Aug 16, 2020 · 7 comments
Open

Add examples with ideal component documentation #25

alexprey opened this issue Aug 16, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers priority:low

Comments

@alexprey
Copy link
Collaborator

Add few examples of what document structure can be parsed by this package

@alexprey alexprey added the enhancement New feature or request label Aug 16, 2020
@TheComputerM
Copy link

Shall I make a basic template? I do not know the full extent of sveltedoc-parser.

@TheComputerM
Copy link

@alexprey
Copy link
Collaborator Author

@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"
          },

@TheComputerM
Copy link

TheComputerM commented Aug 19, 2020

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"
          },

@alexprey
Copy link
Collaborator Author

Yes, this format is a correct, I'm forgot about quotes in text property

@alexprey
Copy link
Collaborator Author

In this commit I'm prepare base for writing examples of components and parsed document structure.

@TheComputerM
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority:low
Projects
None yet
Development

No branches or pull requests

2 participants