feat: WIP generate insomnia-inso docs from source #8099
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 exportprogram
andversion
. I've tested it locally by copying theprogram
variable into the file and removing theaction
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 anindex.md
file and one file for each command (+subcommands).There are a few things to consider:
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).