Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsnickbarry/hardhat-dependency-compiler
📦 Compile Solidity sources directly from NPM dependencies
https://github.com/itsnickbarry/hardhat-dependency-compiler
blockchain buidler dependencies dependency ethereum hardhat npm smart-contracts solc solidity wow yarn
Last synced: about 11 hours ago
JSON representation
📦 Compile Solidity sources directly from NPM dependencies
- Host: GitHub
- URL: https://github.com/itsnickbarry/hardhat-dependency-compiler
- Owner: ItsNickBarry
- License: mit
- Created: 2020-11-26T04:30:25.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T20:35:27.000Z (3 months ago)
- Last Synced: 2024-08-31T01:35:29.237Z (2 months ago)
- Topics: blockchain, buidler, dependencies, dependency, ethereum, hardhat, npm, smart-contracts, solc, solidity, wow, yarn
- Language: TypeScript
- Homepage:
- Size: 132 KB
- Stars: 38
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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
```