blob: 59fc185de0e63a56e005dbfcdcb88fef1134e229 (
plain) (
tree)
|
|
import 'source-map-support/register';
import * as yargs from 'yargs';
import { generateSolDocAsync } from './solidity_doc_generator';
const JSON_TABWIDTH = 4;
(async () => {
const argv = yargs
.option('contracts-dir', {
type: 'string',
description: 'path of contracts directory to compile',
})
.option('contracts', {
type: 'string',
description: 'comma separated list of contracts to compile',
})
.demandOption('contracts-dir')
.array('contracts')
.help().argv;
process.stdout.write(
JSON.stringify(await generateSolDocAsync(argv.contractsDir, argv.contracts), null, JSON_TABWIDTH),
);
})().catch(err => {
throw err;
});
|