Skip to content

Commit

Permalink
feat: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Nov 2, 2021
1 parent 3d1b30c commit ffc218b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Zero-config Hardhat plugin to generate documentation for all your Solidity contr

## 📦 Installation

First thing to do is to install the plugin:
First thing to do is to install the plugin in your Hardhat project:

```bash
# Using yarn
Expand All @@ -23,13 +23,13 @@ Next step is simply to include the plugin into your `hardhat.config.js` or `hard

```typescript
// Using JavaScript
require('primitivefinance/dodoc');
require('@primitivefinance/dodoc');

// Using ES6 or TypeScript
import 'primitivefinance/dodoc';
import '@primitivefinance/dodoc';
```

And you're done! Now you just need to run `npx hardhat compile` to generate the documentation for all your contracts.
And you're done! Now you just need to run `npx hardhat compile` to generate the documentation of all your contracts.

## 🔧 Config

Expand All @@ -44,6 +44,7 @@ import '@primitivefinance-dodoc';
const config: HardhatUserConfig = {
solidity: '0.8.9',
dodoc: {
// Put your configuration here
runOnCompile: true,
testMode: true,
},
Expand All @@ -52,11 +53,11 @@ const config: HardhatUserConfig = {
export default config;
```

Here are all the configuration parameters (don't forget that all of them are entirely optional):
Here are all the configuration parameters that are currently available, as said above, all of them are entirely optional:

| Parameter | Description | Default value |
| -------- | -------- | -------- |
| `runOnCompile` | True if the plugin should generate the documentation on compilation | `true` |
| `runOnCompile` | True if the plugin should generate the documentation on every compilation | `true` |
| `include` | List of all the contract names to include in the documentation generation. An empty array will generate documentation for all the contracts | `[]` |
| `exclude` | List of all the contract names to exclude from the documentation generation | `[]` |
| `outputDir` | Output directory of the documentation | `docs` |
Expand All @@ -67,4 +68,6 @@ Here are all the configuration parameters (don't forget that all of them are ent

Dodoc integrates a super cool template engine called [SquirrellyJS](https://github.com/squirrellyjs/squirrelly), allowing anyone to create new output formats easily.

You can checkout the default Markdown template [here](https://) to get some inspiration. Once you're done with yours, simply refer it using the `templatePath` in your configuration.
You can checkout the [default Markdown template](https://) to get some inspiration as well as [SquirrellyJS documentation](https://squirrelly.js.org/docs). Feel free to be creative, any kind of output such as Markdown, HTML or even JSON is supported!

Once you're satisfied, simply refer to your template using the `templatePath` in your configuration and Dodoc will use it to output the documentation!

0 comments on commit ffc218b

Please sign in to comment.