strothj / react-docgen-typescript-loader

Webpack loader to generate docgen information from Typescript React components.
Other
360 stars 47 forks source link

Make this an integral part of storybook #19

Closed ndelangen closed 5 years ago

ndelangen commented 6 years ago

Hey @strothj I'd love to work with you and use this package to make storybook better for typescript users by default! Do you have some ideas how that could work?

In fact I'll soonish start work on improving the documentation side of things in storybook and would love your help if you'd be up for it!

strothj commented 6 years ago

Hello,

I made a pull request to the project react-docgen-typescript to make it possible to use their package as a peer dependency. My goal is to allow users to take advantage of improvements on their parser without relying on new releases to this one. I have some work on-going on the v3 branch.

I'm also in the process of simplifying the configuration per: https://github.com/strothj/react-docgen-typescript-loader/issues/15, also in that branch.

A major consideration at present is the high cost of the type checking used to produce the docgen information. I've encountered very long start times for development on projects containing 80+ components. This is a problem when all components are loaded at once by Storybook. Because of this problem, I'm not sure it would be feasible to have this enabled by default without some other approach.

I think the integration can be made easier and the documentation improved. I was planning some documentation improvements for this package, especially around the confusion with where users should report parsing issues.

I'll have to think a bit more on what else can be done. What ideas did you have in mind for making TypeScript easier to use? I'd be happy to help with the documentation.

strothj commented 6 years ago

@ndelangen I just found out today that the Docz project inserts this loader when the user enables TypeScript support in the config.

https://github.com/pedronauck/docz/blob/master/packages/docz-core/src/bundlers/webpack/loaders.ts#L23

The documentation for their config file: https://www.docz.site/documentation/project-configuration

strothj commented 5 years ago

I'm closing this issue for house keeping purposes.