reactjs / reactjs/react-docgen

Better documentation on resolvers

Open
#244 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.8k
Forks
316
Avg merge
5h 7m
Merged PRs (30d)
4

Description

I am trying to write a script to generate markdown from the generated JSON output. I have reviewed the documentation for parse() and I am trying to use the findAllComponentDefinitions resolver similar to react-docgen ./myfile.js --resolver findAllComponentDefinitions -o ./docs in the command line. This is what I attempted, but it doesnt work.

const componentAPI = reactDocs.parse(data, reactDocs.findAllComponentDefinitions)
const markdown = generateMarkdown(components[i], componentAPI)

The current documentation does not seem very clear to me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing documentation for parse() and the CLI example using findAllComponentDefinitions. Trace how the resolver is passed to reactDocs.parse and how its generated JSON can feed Markdown generation; the work is done when the library usage and expected output are documented clearly enough to reproduce the CLI flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.