Skip to content

freighttrust/solidity-docgen

 
 

Repository files navigation

solidity-docgen

Documentation generator for smart contract libraries.

solidity-docgen allows you to document your code inline using NatSpec comments (a format similar to Javadoc and JSDoc) and then produce a website to publish the documentation.

Built with ❤️ by OpenZeppelin.

Usage

Note: Detailed usage information is not available yet. Please be patient!

npm install solidity-docgen

solidity-docgen takes as input a directory of contracts and README documents. This directory is specified using the --input/-i flag, defaulting to ./contracts. It produces a set of files that it will place in the output directory specified by --output/-o, defaulting to ./docs.

solidity-docgen [ -i <input-dir> ] [ -o <output-dir> ] [ -t <templates-dir> ]

Contracts with Dependendencies

Dependencies don't work out of the box yet, and you have to manually set up solc remappings.

For example, for OpenZeppelin dependencies like @openzeppelin/contracts you would run the following command.

solidity-docgen --solc-settings "{remappings: ['@openzeppelin=$PWD/node_modules/@openzeppelin']}"

About

Documentation generator for Solidity projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.4%
  • JavaScript 4.6%
  • HTML 2.0%