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

Is possible to generate doc with imported component #185

Closed
intelcoder opened this issue May 18, 2017 · 3 comments
Closed

Is possible to generate doc with imported component #185

intelcoder opened this issue May 18, 2017 · 3 comments
Labels

Comments

@intelcoder
Copy link

I want to get generated doc in javascript. However, parse function does not seem to work or i do not know how to use properly.

import { SimpleButton } from 'Buttons'

What I want to do is exactly code below
const json = docGen.parse(SimpleButton);``

@fkling
Copy link
Member

fkling commented May 18, 2017

react-docgen does not follow dependencies. See #33, #73, #180 for similar issues. If you want to get the documentation for SimpleButton, you should pass the file where the Buttons module is defined.

@intelcoder
Copy link
Author

So only way it can parse the component is that receiving path name?
What I can do is like below ?
const json = docGen.parse(Path, resolver);

@pasupuletics
Copy link

pasupuletics commented May 27, 2017

@intelcoder, is your import and docgen.parse in same file? If yes doc gen doesn't understad this. Src value must be string.

@danez danez closed this as completed Jul 13, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants