Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dlsl/hardhat-markup

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlsl/hardhat-markup

Customizable markdown smart contracts documentation

latest
Source
npmnpm
Version
1.0.0-rc.14
Version published
Maintainers
2
Created
Source

npm hardhat

Hardhat Markup

Hardhat plugin to generate customizable smart contracts documentation.

What

This plugin generates markdown documentation of the contracts present in the project. Leveraging the natspec and solc capabilities, it is able to output beautiful uniswap-like .md files.

Installation

npm install --save-dev @dlsl/hardhat-markup

Add the following statement to your hardhat.config.js:

require("@dlsl/hardhat-markup")

Or, if you are using TypeScript, add this to your hardhat.config.ts:

import "@dlsl/hardhat-markup"

Tasks

The documentation generation can be run either with built-in compile or the provided markup task.

To view the available options, run these help commands:

npx hardhat help compile
npx hardhat help markup

Environment extensions

This plugin does not extend the environment.

Usage

The npx hardhat markup command will compile and generate documentation for all the contracts used in the project into the default folder.

Clean old artifacts via npx hardhat clean command.

Configuration

The default configuration looks as follows. You may customize all fields in your hardhat config file.

module.exports = {
  markup: {
    outdir: "./generated-markups",
    onlyFiles: [],
    skipFiles: [],
    noCompile: false,
    verbose: false,
  },
}
  • outdir: The directory where to store the generated documentation
  • onlyFiles: If specified, documentation will be generated only for matching sources, other will be ignored
  • skipFiles: Documentation will not be generated for any matching sources, also if those match onlyFiles
  • noCompile: Skips project recompilation before the documentation generation
  • verbose: Detailed logging on generation

Including/excluding files

  • Path stands for relative path from project root to either .sol file or directory.
  • If path is a directory, all its files and sub-directories are considered matching.
  • If source is a node module, node_modules must not be present in the path.

Known limitations

  • Vyper is currently not supported.

Keywords

ethereum

FAQs

Package last updated on 16 Jun 2023

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