Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyace84 committed Jan 21, 2023
1 parent 8664f97 commit b37ac38
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/ast-builder/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { compileAst, compileExternalAst } from './compile-ast';
export { makeBuild } from './builder';
11 changes: 11 additions & 0 deletions src/ast-builder/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { SourceUnit } from 'solidity-ast';

export interface Sources {
[file: string]: SourceUnit;
}
export interface FullSources {
[file: string]: {
asts: SourceUnit[];
astPath: string;
};
}
12 changes: 7 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { makeBuild } from './ast-builder';
import { defaults, Config } from './config';

export { main as docgen } from './main';
export { docItemTypes } from './doc-item';
export { DocItemWithContext } from './site';
export { genDoc as defaultDocgen } from './gendoc';
import './hardhat/type-extensions';

if ('extendConfig' in global && 'task' in global) {
// Assume Hardhat.
require('./hardhat');
export async function defaultDocgen(userConfig: Config = defaults) {
const { main } = await import('./main');
const config = { ...defaults, ...userConfig };
await main([await makeBuild(config)], config);
}

// We ask Node.js not to cache this file.
Expand Down

0 comments on commit b37ac38

Please sign in to comment.