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

Example Doclets #109

Merged
merged 2 commits into from
Mar 28, 2016
Merged

Example Doclets #109

merged 2 commits into from
Mar 28, 2016

Conversation

paulj
Copy link
Collaborator

@paulj paulj commented Mar 28, 2016

This PR introduces the ability to associate additional example files using doclet tags in the description.

For example, a component defined like the below will have the examples in extra.examples.md associated with it:

  /**
   * Component is described here.
   *
   * @example ./extra.examples.md
   */
  export default class SomeComponent extends React.Component {
    // ...
  }

@sapegin
Copy link
Member

sapegin commented Mar 28, 2016

Thanks!

Can we reuse someting from this file?

@paulj
Copy link
Collaborator Author

paulj commented Mar 28, 2016

@sapegin we actually do use the functionality from that file. The doclets are parsed with props.doclets = reactDocs.utils.docblock.getDoclets(props.description);, which ultimately lands in that file. I had to reproduce the regexp though, since that file doesn't provide any mechanism for stripping out the doclets from the description once they are parsed.

@sapegin
Copy link
Member

sapegin commented Mar 28, 2016

Sorry, didn’t notice it.

@sapegin sapegin merged commit f0902e1 into styleguidist:master Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants