BREAKING CHANGE: document contracts from sol-doc
Change website to accept smart contract documentation in the format generated by sol-doc rather than that generated by Doxity.
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
import { MenuSubsectionsBySection } from '@0xproject/react-shared';
|
||||
import { DocAgnosticFormat, GeneratedDocJson, TypeDefinitionByName } from '@0xproject/types';
|
||||
import { DocAgnosticFormat, TypeDefinitionByName } from '@0xproject/types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
ContractsByVersionByNetworkId,
|
||||
DocsInfoConfig,
|
||||
DocsMenu,
|
||||
DoxityDocObj,
|
||||
SectionNameToMarkdownByVersion,
|
||||
SectionsMap,
|
||||
SupportedDocJson,
|
||||
} from './types';
|
||||
import { doxityUtils } from './utils/doxity_utils';
|
||||
import { TypeDocUtils } from './utils/typedoc_utils';
|
||||
|
||||
export class DocsInfo {
|
||||
public id: string;
|
||||
@@ -93,12 +90,4 @@ export class DocsInfo {
|
||||
const typeDefinitionByName = _.keyBy(typeDocSection.types, 'name') as any;
|
||||
return typeDefinitionByName;
|
||||
}
|
||||
public convertToDocAgnosticFormat(docObj: DoxityDocObj | GeneratedDocJson): DocAgnosticFormat {
|
||||
if (this.type === SupportedDocJson.Doxity) {
|
||||
return doxityUtils.convertToDocAgnosticFormat(docObj as DoxityDocObj);
|
||||
} else {
|
||||
const typeDocUtils = new TypeDocUtils(docObj as GeneratedDocJson, this);
|
||||
return typeDocUtils.convertToDocAgnosticFormat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user