strothj / babel-plugin-react-docgen-typescript

Babel Plugin to generate docgen data from React components written in TypeScript.
12 stars 4 forks source link

Add shouldExtractLiteralValuesFromEnum support #4

Closed DSil closed 4 years ago

DSil commented 4 years ago

react-docgen-typescript now supports custom-defined enum types.

I needed this support here. However, for that to work, some dependencies were updated. I updated the minimum amount of packages possible.

I have also added a new prop to the "test component", in order to be able to add a new test for the new feature.

DSil commented 4 years ago

@strothj are you still maintaining this?

strothj commented 4 years ago

Yes, sorry, I've been busy the last few days. I'll review this shortly.

strothj commented 4 years ago

I published your changes as v1.3.0. For most uses I'd recommend the react-docgen-typescript-loader since that receives the most contributions but I see no reason to close this repo.

I've updated the emitted docgens to use relative paths (previous behavior was absolute paths) for component paths to match the behavior of react-docgen-typescript-loader. This stabilizes the test snapshots between developer machines.

DSil commented 4 years ago

Thank you very much! The only reason I keep using this (instead of react-docgen-typescript-loader) is because the project I'm working on uses babel, and not ts-loader. But, for now, v1.3.0 should do everything I need 🙂