# hardhat-dependency-compiler

> Compile Solidity sources directly from NPM dependencies

Latest version **1.2.1** (published 2024-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install hardhat-dependency-compiler
pnpm add hardhat-dependency-compiler
yarn add hardhat-dependency-compiler
bun add hardhat-dependency-compiler
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2024-06-21 |
| First published | 2020-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=14.14.0 |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nick Barry |
| Keywords | hardhat, buidler, solidity, solc, npm, yarn, dependency, dependencies, smart-contracts, ethereum, blockchain, wow |

## Links

- npm: https://www.npmjs.com/package/hardhat-dependency-compiler
- Repository: https://github.com/ItsNickBarry/hardhat-dependency-compiler
- npm.io page: https://npm.io/package/hardhat-dependency-compiler

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2024-06-21
- 1.2.0 — 2024-06-20
- 1.1.4 — 2024-03-28
- 1.1.3 — 2022-06-08
- 1.1.2 — 2021-10-31
- 1.1.1 — 2021-03-16
- 1.1.0 — 2021-03-03
- 1.0.2 — 2021-01-08
- 1.0.1 — 2020-12-17
- 1.0.0 — 2020-11-26

## README

# Hardhat Dependency Compiler

Compile Solidity sources directly from NPM dependencies.

## Installation

```bash
npm install --save-dev hardhat-dependency-compiler
# or
yarn add --dev hardhat-dependency-compiler
```

## Usage

Load plugin in Hardhat config:

```javascript
require('hardhat-dependency-compiler');
```

Add configuration under the `dependencyCompiler` key:

| option  | description                                                                                                                                  | default                           |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `paths` | `Array` of dependency paths to compile                                                                                                       | `[]`                              |
| `path`  | path to temporary directory where dependencies are imported (relative to Hardhat sources directory)                                          | `'./hardhat-dependency-compiler'` |
| `keep`  | whether to keep temporary file directory after compilation is complete (directory will still be deleted and regenerated on each compilation) | `false`                           |

```javascript
dependencyCompiler: {
  paths: [
    '@solidstate/contracts/interfaces/IERC20.sol',
  ],
}
```

## Development

Install dependencies via Yarn:

```bash
yarn install
```

Setup Husky to format code on commit:

```bash
yarn prepare
```

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