From 799a439f6fe8325fc40a8a1aaec1a61907576b37 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sun, 24 Nov 2019 16:47:19 -0800 Subject: [PATCH 1/3] Add buidler config and run info --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 3f19fa67..1227f6b2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ ![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/beta) [![CircleCI](https://circleci.com/gh/sc-forks/solidity-coverage.svg?style=svg)][20] [![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/beta/graph/badge.svg)][21] +[![buidler](https://buidler.dev/buidler-plugin-badge.svg?1)][26] + ## Code coverage for Solidity testing ![coverage example][22] @@ -31,6 +33,21 @@ module.exports = { truffle run coverage [command-options] ``` +## [Buidler][26] + +**Use** the plugin in `buidler.config.js` +```javascript +usePlugin('solidity-coverage') + +module.exports = { + networks: {...}, +} +``` +**Run** +``` +npx buidler coverage [command-options] +``` + ## Usage notes: + Coverage runs tests a little more slowly. + Coverage launches its own in-process ganache server. @@ -152,3 +169,5 @@ $ yarn [23]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#workflow-hooks [24]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#skipping-tests [25]: https://github.com/sc-forks/solidity-coverage/issues/417 +[26]: https://buidler.dev/ + From 2c0a8cacecd17fe9f275db9e890de3d2515a7aea Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sun, 24 Nov 2019 16:50:55 -0800 Subject: [PATCH 2/3] Sub 'add' for 'use' --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 1227f6b2..693380fb 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ truffle run coverage [command-options] ## [Buidler][26] -**Use** the plugin in `buidler.config.js` +**Add** the plugin in `buidler.config.js` ```javascript usePlugin('solidity-coverage') @@ -170,4 +170,3 @@ $ yarn [24]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#skipping-tests [25]: https://github.com/sc-forks/solidity-coverage/issues/417 [26]: https://buidler.dev/ - From 35410da06391d1cb2f1468eaad86a07774bcad21 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sun, 24 Nov 2019 17:04:46 -0800 Subject: [PATCH 3/3] Add docs links --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 693380fb..4ff578b0 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ $ npm install --save-dev solidity-coverage@beta ``` -## Truffle V5 +### Truffle V5 -**Add** this package to your plugins array in `truffle-config.js` +**Add** this package to your plugins array in `truffle-config.js` ([Truffle docs][27]) ```javascript module.exports = { networks: {...}, @@ -33,9 +33,9 @@ module.exports = { truffle run coverage [command-options] ``` -## [Buidler][26] +### Buidler -**Add** the plugin in `buidler.config.js` +**Add** the plugin in `buidler.config.js` ([Buidler docs][26]) ```javascript usePlugin('solidity-coverage') @@ -79,7 +79,7 @@ module.exports = { ``` -| Option | Type | Default | Description | +| Option | Type | Default | Description | | ------ | ---- | ------- | ----------- | | silent | *Boolean* | false | Suppress logging output | | client | *Object* | `require("ganache-core")` | Useful if you need a specific ganache version. | @@ -170,3 +170,4 @@ $ yarn [24]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#skipping-tests [25]: https://github.com/sc-forks/solidity-coverage/issues/417 [26]: https://buidler.dev/ +[27]: https://www.trufflesuite.com/docs