aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/example/ts/docs.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-07 21:23:00 +0800
committerFabio Berger <me@fabioberger.com>2018-03-07 21:23:00 +0800
commita3e15c910c4722dbd3c0b5d8bd4ef28abe1667eb (patch)
tree0efbbf8993d469422ba7d2fde461d4cd08d43435 /packages/react-docs/example/ts/docs.tsx
parenta6303de4d1973039c6f97b0a47af8877fd86e837 (diff)
downloaddexon-sol-tools-a3e15c910c4722dbd3c0b5d8bd4ef28abe1667eb.tar.gz
dexon-sol-tools-a3e15c910c4722dbd3c0b5d8bd4ef28abe1667eb.tar.zst
dexon-sol-tools-a3e15c910c4722dbd3c0b5d8bd4ef28abe1667eb.zip
Update 0.2.0 doc json to include types
Diffstat (limited to 'packages/react-docs/example/ts/docs.tsx')
-rw-r--r--packages/react-docs/example/ts/docs.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/react-docs/example/ts/docs.tsx b/packages/react-docs/example/ts/docs.tsx
index caff83422..c4b165c13 100644
--- a/packages/react-docs/example/ts/docs.tsx
+++ b/packages/react-docs/example/ts/docs.tsx
@@ -4,6 +4,7 @@ import * as React from 'react';
import { Documentation } from '../../src/ts/components/documentation';
import { DocsInfo } from '../../src/ts/docs_info';
import { DocAgnosticFormat, DocsInfoConfig, SupportedDocJson, TypeDocNode } from '../../src/ts/types';
+import { constants } from '../../src/ts/utils/constants';
import * as v0TypeDocJson from './json/0.1.12.json';
import * as v2TypeDocJson from './json/0.2.0.json';
@@ -15,6 +16,7 @@ const IntroMarkdown = require('md/introduction');
const docSections = {
introduction: 'introduction',
web3Wrapper: 'web3Wrapper',
+ types: constants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
@@ -25,6 +27,7 @@ const docsInfoConfig: DocsInfoConfig = {
menu: {
introduction: [docSections.introduction],
web3Wrapper: [docSections.web3Wrapper],
+ types: [docSections.types],
},
sectionNameToMarkdown: {
[docSections.introduction]: IntroMarkdown,
@@ -33,7 +36,8 @@ const docsInfoConfig: DocsInfoConfig = {
// currently no way to extract the re-exported types from index.ts via TypeDoc :(
publicTypes: ['TxData', 'TransactionReceipt', 'RawLogEntry'],
sectionNameToModulePath: {
- [docSections.web3Wrapper]: ['"index"'],
+ [docSections.web3Wrapper]: ['"web3-wrapper/src/index"'],
+ [docSections.types]: ['"types/src/index"'],
},
menuSubsectionToVersionWhenIntroduced: {},
sections: docSections,
@@ -59,7 +63,7 @@ export class Docs extends React.Component<DocsProps, DocsState> {
super(props);
this.state = {
selectedVersion: availableVersions[1],
- docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(v0TypeDocJson),
+ docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(v2TypeDocJson),
};
}
public render() {