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

load variables from other files #170

Closed
chrisdrackett opened this issue Mar 31, 2017 · 4 comments
Closed

load variables from other files #170

chrisdrackett opened this issue Mar 31, 2017 · 4 comments

Comments

@chrisdrackett
Copy link

We have a lot of our common variables (sizes, colors, etc) all defined in a single file. I like to reference these when building out propTypes. Currently docgen (via styleguidist) does not pick up these variables as they are all from an external file. It would be nice if there was a way to teach docgen to look at this variable file or similar. I'm going to see what I can figure out, but figured it was worth posting this in case anyone has had a similar issue and has already found a solution.

@dotcs
Copy link

dotcs commented Apr 5, 2017

May be related to this issue: #33

@n1313
Copy link

n1313 commented Jun 12, 2017

I'm having the same problem: I have a bunch of string constants shared across many files and docgen (understandably) does not pick up their values when I use them in propType declarations. I think this use case is simpler than #33 and could probably be fixed by supplying docgen with a map of constants and doing a search-replace for them in AST data before emitting it.

@Palid
Copy link

Palid commented Dec 22, 2017

+1, this breaks rendering in react-styleguidist too :(

@danez
Copy link
Collaborator

danez commented Jul 13, 2018

Duplicate of #33

@danez danez closed this as completed Jul 13, 2018
@danez danez marked this as a duplicate of #33 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
None yet
Projects
None yet
Development

No branches or pull requests

5 participants