0.0.4 • Published 3 years ago
foundry-docgen v0.0.4
foundry-docgen
Note: Work in progress, very buggy, barely works
A basic tool for generating markdown docs for a Foundry project using existing NatSpec comments in the contracts. Uses solidity-docgen under the hood.
Usage
In the root directory of your Foundry project, run
npx foundry-docgenThis will generate docs for all contracts under ./docgen. Alternatively, specify a list of contracts you want to generate docs for, e.g.
npx foundry-docgen Greeter MyNFTYou can also specify the input and output paths. For instance,
npx foundry-docgen --in ~/Documents/foundry-project/out --out ./documentationsUse npx foundry-docgen help to see all options.
Known issues
- Running
npx foundry-docgenfor complex projects can trigger the errorError: Circular dependency detected: aliased imports not supported. - Running
npx foundry-docgen SomeContractmay trigger errors likeError: No node with id 2944 of type SourceUnitdue toSomeContract's Solidity AST referencing other contracts as dependencies.