Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
hardhat-docgen
Advanced tools
Readme
Generate a static documentation site from NatSpec comments automatically on compilation with Hardhat.
yarn add --dev hardhat-docgen
Load plugin in Hardhat config:
require('hardhat-docgen');
Add configuration under the docgen
key:
option | description | default |
---|---|---|
path | path to HTML export directory (relative to Hardhat root) | './docgen' |
clear | whether to delete old files in path on documentation generation | false |
runOnCompile | whether to automatically generate documentation during compilation | false |
only | Array of String matchers used to select included contracts, defaults to all contracts if length is 0 | ['^contracts/'] (dependent on Hardhat paths configuration) |
except | Array of String matchers used to exclude contracts | [] |
docgen: {
path: './docs',
clear: true,
runOnCompile: true,
}
The included Hardhat task may be run manually:
yarn run hardhat docgen
By default, the hardhat compile
task is run before generating documentation. This behavior can be disabled with the --no-compile
flag:
yarn run hardhat docgen --no-compile
The path
directory will be created if it does not exist.
The clear
option is set to false
by default because it represents a destructive action, but should be set to true
in most cases.
FAQs
Generate NatSpec documentation automatically on compilation
The npm package hardhat-docgen receives a total of 1,625 weekly downloads. As such, hardhat-docgen popularity was classified as popular.
We found that hardhat-docgen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.