Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hardhat-docgen

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat-docgen

Generate NatSpec documentation automatically on compilation

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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:

optiondescriptiondefault
pathpath to HTML export directory (relative to Hardhat root)'./docgen'
clearwhether to delete old files in path on documentation generationfalse
runOnCompilewhether to automatically generate documentation during compilationfalse
onlyArray of String matchers used to select included contracts, defaults to all contracts if length is 0['^contracts/'] (dependent on Hardhat paths configuration)
exceptArray 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.

Keywords

FAQs

Package last updated on 30 Dec 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc