# @libotony/sharp-compile

> Compile solidity codes

Latest version **1.0.0-beta.3** (published 2019-09-19) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @libotony/sharp-compile
pnpm add @libotony/sharp-compile
yarn add @libotony/sharp-compile
bun add @libotony/sharp-compile
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.3 |
| Published | 2019-09-19 |
| First published | 2019-09-11 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tony.li |
| Maintainers | tony.li |

## Links

- npm: https://www.npmjs.com/package/@libotony/sharp-compile
- Repository: https://github.com/libotony/sharp-compile
- Homepage: https://github.com/libotony/sharp-compile#readme
- Issues: https://github.com/libotony/sharp-compile/issues
- npm.io page: https://npm.io/package/@libotony/sharp-compile

## Dependencies (4)

- [solc](https://npm.io/package/solc.md) ^0.5.11
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [semver](https://npm.io/package/semver.md) ^6.3.0
- [require-from-string](https://npm.io/package/require-from-string.md) ^2.0.2

## Recent versions

- 1.0.0-beta.3 (latest) — 2019-09-19
- 1.0.0-beta.1 — 2019-09-11

## README

# Sharp Compile

Compile contracts written in solidity. Wrap of [solc-js](https://github.com/ethereum/solc-js) for [sharp-cli](https://github.com/libotony/sharp-cli) `compile` command.

+ Load solidity compiler by semver
+ Compile contract source
+ Resolve local file dependencies

## API

### Load solidity compiler

``` javascript
// accept semver range as the parameter
import { getSolidityCompiler } from '@****/sharp-compile'

const solc = getSolidityCompiler('^0.4.24')
```

### Compile contract source

``` javascript
import { compile } from '@****/sharp-compile'

const jsonOutput = compile(solc, { contractsDirectory, file, options })
```

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