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

feat: WIP generate insomnia-inso docs from source #8099

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

fabianrbz
Copy link

Add a script that generates the reference docs for insomnia-inso from the source code. Commander exposes commands, options and descriptions which we can use to generate the markdown files.

This is a WIP to start a convo and an initial implementation, the script doesn't work as it is because cli.ts doesn't export program and version. I've tested it locally by copying the program variable into the file and removing the action from each command. I've tried exporting the variables, but got a weird error : ERROR: No loader is configured for ".node"....

It generates a folder at the root reference/insomnia-inso/<version>/, with an index.md file and one file for each command (+subcommands).

There are a few things to consider:

  • relative links in the generated markdown files
  • figure out a way to include examples in the markdown files, e.g. we could use program.addHelpText('afterAll',

The end goal would be to have a github action that runs this script and opens a PR against the insomnia-docs repo (where the generated files should live).

Add a script that generates the reference docs for insomnia-inso from
the source code. Commander exposes commands, options and descriptions
which we can use to generate the markdown files.

This is a WIP to start a convo and an initial implementation, the script
doesn't work as it is because `cli.ts` doesn't export `program` and
`version`.
@CLAassistant
Copy link

CLAassistant commented Oct 17, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants