hardhat-docgen
Generate NatSpec documentation automatically on compilation
90,422
47
| Install | |
|---|---|
npm install hardhat-docgen |
|
| Latest Version: | 1.3.0 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | May 7, 2025 |
| Links: | GitHub · npm |
Maintainer: itsnickbarry
Hardhat Docgen
Generate a static documentation site from NatSpec comments automatically on compilation with Hardhat.
Installation
yarn add --dev hardhat-docgen
Usage
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.
Related Packages
web3-token
Web3 Token is a new way to authenticate users in hybrid dApps using signed messa...
81,222
368
chain-syncer
chain-syncer is a JS module which allows you to synchronize your app with any et...
8,621
25
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.0 | ^2.6.14 | MIT | |
| 1.2.1 | ^2.6.14 | MIT | |
| 1.2.0 | ^2.6.12 | MIT | |
| 1.1.3 | ^2.6.12 | MIT | |
| 1.1.2 | ^2.6.12 | MIT | |
| 1.1.1 | ^2.6.12 | MIT | |
| 1.1.0 | ^2.6.12 | MIT | |
| 1.0.3 | ^2.6.12 | MIT | |
| 1.0.2 | ^2.6.12 | MIT | |
| 1.0.1 | ^2.6.12 | MIT | |
| 1.0.0 | ^2.6.12 | MIT | |
| 0.0.0 | MIT |