# @dlsl/hardhat-markup

> Customizable markdown smart contracts documentation

Latest version **1.0.0-rc.14** (published 2023-06-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @dlsl/hardhat-markup
pnpm add @dlsl/hardhat-markup
yarn add @dlsl/hardhat-markup
bun add @dlsl/hardhat-markup
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0-rc.14 |
| Published | 2023-06-16 |
| First published | 2023-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 113.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Distributed Lab |
| Maintainers | volendi, arvolear |
| Keywords | ethereum, solidity, smart-contracts, hardhat, hardhat-plugin, distributedlab, documentation, markup |

## Links

- npm: https://www.npmjs.com/package/@dlsl/hardhat-markup
- Repository: https://github.com/dl-solidity-library/hardhat-markup
- Homepage: https://github.com/dl-solidity-library/hardhat-markup#readme
- Issues: https://github.com/dl-solidity-library/hardhat-markup/issues
- npm.io page: https://npm.io/package/@dlsl/hardhat-markup

## Dependencies (3)

- [json2md](https://npm.io/package/json2md.md) ^2.0.0
- [solidity-ast](https://npm.io/package/solidity-ast.md) ^0.4.49
- [prettier-plugin-solidity](https://npm.io/package/prettier-plugin-solidity.md) ^1.1.3

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.0-rc.14 (latest) — 2023-06-16
- 1.0.0-rc.13 — 2023-06-14
- 1.0.0-rc.12 — 2023-06-02
- 1.0.0-rc.11 — 2023-05-30
- 1.0.0-rc.10 — 2023-05-24
- 1.0.0-rc.9 — 2023-05-23
- 1.0.0-rc.8 — 2023-05-23
- 1.0.0-rc.7 — 2023-02-07
- 1.0.0-rc.6 — 2023-02-06
- 1.0.0-rc.5 — 2023-01-30
- 1.0.0-rc.4 — 2023-01-26
- 1.0.0-rc.3 — 2023-01-26
- 1.0.0-rc.2 — 2023-01-25
- 1.0.0-rc.1 — 2023-01-25

## README

[![npm](https://img.shields.io/npm/v/@dlsl/hardhat-markup.svg)](https://www.npmjs.com/package/@dlsl/hardhat-markup) [![hardhat](https://hardhat.org/buidler-plugin-badge.svg?1)](https://hardhat.org)

# Hardhat Markup

[Hardhat](https://hardhat.org) 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

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

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

```js
require("@dlsl/hardhat-markup")
```

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

```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:

```bash
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.

```js
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.

---
_Source: https://npm.io/package/@dlsl/hardhat-markup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
