-
Notifications
You must be signed in to change notification settings - Fork 48
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
Apply react-docgen-typescript-plugin to generate storybook documentations from JSDoc #931
Apply react-docgen-typescript-plugin to generate storybook documentations from JSDoc #931
Conversation
|
GitHub registry에 배포된 npm registry에 해당 패키지를 public으로 배포할지 체크 필요함 (bezier-react는 public package이기 때문에 organization-scope 접근 권한을 강제할 수 없음) |
Chromatic Report🚀 Congratulations! Your build was successful! |
Codecov ReportBase: 71.08% // Head: 71.20% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## next-v1 #931 +/- ##
===========================================
+ Coverage 71.08% 71.20% +0.12%
===========================================
Files 208 208
Lines 2967 2980 +13
Branches 823 823
===========================================
+ Hits 2109 2122 +13
Misses 739 739
Partials 119 119
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -7,13 +7,35 @@ import type { InjectedInterpolation } from './Foundation' | |||
|
|||
/* Component Base Props */ | |||
export interface RenderConfigProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
… to production storybook
… expand enum values
this package is public to anonymous user
9dee6f1
to
5e760f7
Compare
Self Checklist
Related IssueSummary
react-docgen-typescript-plugin
을 적용하여, 스토리북에서 JSDoc에 의해 generate된 documentation을 확인할 수 있도록 합니다.Props interface의 각 필드에 추가된 jsdoc, default value등을 확인할 수 있습니다.
Documentation을 MDX 문서에 추가해, API section이 자동적으로 관리되도록 지정했습니다.
Details
원래
react-docgen-typescript-plugin
은 typescript를 사용하고 있다면 storybook에서 out-of-the-box로 바로 적용되어야 합니다. (#)그러나, 복합적인 이슈 때문에 이것이 작동하지 않고 있었는데, 이 점을 차례대로 고쳤습니다.
기본적으로 적용되는 plugin은
react-docgen-typescript-plugin
은react-docgen-typescript
v1을 사용합니다. 그러나, 이 package는 v1에서typescript < 4.3
에서만 작동합니다.typescript >= 4.3
에서 작동하기 위해서는 v2를 사용해야 하는데, 이것은 breaking change이기 때문에 storybook v6에서는 적용되지 않았습니다.react-docgen-typescript-plugin
을 fork하여react-docgen-typescript
v2를 사용하도록 합니다.react-docgen-typescript-plugin
은 default export되는 컴포넌트에 잘 적용되지 않는 이슈가 있습니다.react-docgen-typescript-plugin
은 HMR 환경에서 많은 메모리를 소비합니다. (OOM 에러를 자주 발생시킵니다.)Breaking change or not (Yes/No)
No
References