-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (26 loc) · 769 Bytes
/
index.js
File metadata and controls
32 lines (26 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require('path');
const { extendConfig } = require('hardhat/config');
require('./tasks/compile.js');
require('./tasks/docgen.js');
extendConfig(function (config, userConfig) {
const { root, sources } = config.paths;
config.docgen = Object.assign(
{
path: './docgen',
clear: false,
runOnCompile: false,
only: [`^${path.relative(root, sources)}/`],
except: [],
},
userConfig.docgen,
);
for (const compiler of config.solidity.compilers) {
const outputSelection = compiler.settings.outputSelection['*']['*'];
if (!outputSelection.includes('devdoc')) {
outputSelection.push('devdoc');
}
if (!outputSelection.includes('userdoc')) {
outputSelection.push('userdoc');
}
}
});