This PR creates a new tool to generate docs for the suave-std contracts.
The tool is separated in two steps. First, read the artifacts built by forge and create a JSON file with the summary, names, fields, descriptions, etc... for every contract with documentation in the artifacts folder. Second, use a simple template engine to generate the documentation in markdown file from the data generated in the previous step.
The idea to separate in two stages is that eventually we might have the summary generated here but the target for the docs (suave-docs) might decide how to render then.
To generate the docs use:
$ cd tools/docs-gen
$ go run main.go --suave-std ../../ --out ../../docs
As part of this PR I also added some basic documentation for all the major contracts in suave-std.
This PR creates a new tool to generate docs for the
suave-std
contracts.The tool is separated in two steps. First, read the artifacts built by
forge
and create a JSON file with the summary, names, fields, descriptions, etc... for every contract with documentation in the artifacts folder. Second, use a simple template engine to generate the documentation in markdown file from the data generated in the previous step.The idea to separate in two stages is that eventually we might have the summary generated here but the target for the docs (suave-docs) might decide how to render then.
To generate the docs use:
As part of this PR I also added some basic documentation for all the major contracts in
suave-std
.