fix: rename SupportedDocJson field to SolDoc
from Solidity https://github.com/0xProject/0x-monorepo/pull/1004#discussion_r219976199 https://github.com/0xProject/0x-monorepo/pull/1004
This commit is contained in:
@@ -329,7 +329,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
||||
return <div>{externalExports}</div>;
|
||||
}
|
||||
private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode {
|
||||
if (this.props.docsInfo.type !== SupportedDocJson.Solidity) {
|
||||
if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export enum KindString {
|
||||
}
|
||||
|
||||
export enum SupportedDocJson {
|
||||
Solidity = 'SOLIDITY',
|
||||
SolDoc = 'SOL_DOC',
|
||||
TypeDoc = 'TYPEDOC',
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export const constants = {
|
||||
TYPES_SECTION_NAME: 'types',
|
||||
EXTERNAL_EXPORTS_SECTION_NAME: 'external exports',
|
||||
TYPE_TO_SYNTAX: {
|
||||
[SupportedDocJson.Solidity]: 'solidity',
|
||||
[SupportedDocJson.SolDoc]: 'solidity',
|
||||
[SupportedDocJson.TypeDoc]: 'typescript',
|
||||
} as { [supportedDocType: string]: string },
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ const IntroMarkdownV2 = require('md/docs/smart_contracts/2.0.0/introduction');
|
||||
const docsInfoConfig: DocsInfoConfig = {
|
||||
id: DocPackages.SmartContracts,
|
||||
packageName: 'contracts',
|
||||
type: SupportedDocJson.Solidity,
|
||||
type: SupportedDocJson.SolDoc,
|
||||
displayName: '0x Smart Contracts',
|
||||
packageUrl: 'https://github.com/0xProject/contracts',
|
||||
markdownMenu: {
|
||||
|
||||
@@ -141,7 +141,7 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
|
||||
versionDocObj as GeneratedDocJson,
|
||||
this.props.docsInfo,
|
||||
).convertToDocAgnosticFormat();
|
||||
} else if (this.props.docsInfo.type === SupportedDocJson.Solidity) {
|
||||
} else if (this.props.docsInfo.type === SupportedDocJson.SolDoc) {
|
||||
// documenting solidity.
|
||||
docAgnosticFormat = versionDocObj as DocAgnosticFormat;
|
||||
// need to modify docsInfo like convertToDocAgnosticFormat() would do
|
||||
|
||||
Reference in New Issue
Block a user