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

chore: add build step to generate react docgen metadata #4662

Merged

Conversation

vpicone
Copy link
Contributor

@vpicone vpicone commented Nov 12, 2019

Closes #4635

New:

  • BABEL_ENV docgen
    • includes babel-plugin-react-docgen
    • outputs abuild/docgen (not published)
  • Use build/docgen to generate a react-docgen.json file (published)

Testing:

  • yarn workspace carbon-components-react build
  • Should generate a react-docgen.json file with docgen data in the react package.

@vpicone vpicone requested a review from a team as a code owner November 12, 2019 18:40
@ghost ghost requested review from jnm2377 and joshblack November 12, 2019 18:41
@netlify
Copy link

netlify bot commented Nov 12, 2019

Deploy preview for the-carbon-components ready!

Built with commit c253887

https://deploy-preview-4662--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Nov 12, 2019

Deploy preview for carbon-components-react ready!

Built with commit c253887

https://deploy-preview-4662--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Nov 12, 2019

Deploy preview for carbon-elements ready!

Built with commit c253887

https://deploy-preview-4662--carbon-elements.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM basically - Would you fix the CI? Thanks @vpicone!

@vpicone
Copy link
Contributor Author

vpicone commented Nov 14, 2019

@asudoh fixed thanks! @jnm2377 @joshblack holler if you have any questions

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, docgen directory and react-docgen.json are generated

Use build/docgen to generate a react-docgen.json file (published)

just wondering, does react-docgen.json need to be separate from build/docgen if they're both ignored? or does the json file need to be at the package root?

@vpicone
Copy link
Contributor Author

vpicone commented Nov 14, 2019

@emyarod "publish" here refers to what get's pushed to npm. The build directory is ignored when publishing, the react-docgen.json file is not.

It doesn't need to be at the package root per-se, but it makes it easy to find/import. It's also where we put metadata files historically (icons, pictograms).

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks for confirming

@emyarod emyarod merged commit 662c3a8 into carbon-design-system:master Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[React]: Some components are compiled so awkwardly they can't be processed by react-docgen
3 participants