aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r--packages/website/ts/containers/connect_documentation.ts58
-rw-r--r--packages/website/ts/containers/contract_wrappers_documentation.ts66
-rw-r--r--packages/website/ts/containers/ethereum_types_documentation.ts74
-rw-r--r--packages/website/ts/containers/json_schemas_documentation.ts47
-rw-r--r--packages/website/ts/containers/order_utils_documentation.ts49
-rw-r--r--packages/website/ts/containers/order_watcher_documentation.ts66
-rw-r--r--packages/website/ts/containers/smart_contracts_documentation.ts6
-rw-r--r--packages/website/ts/containers/sol_compiler_documentation.ts36
-rw-r--r--packages/website/ts/containers/sol_cov_documentation.ts65
-rw-r--r--packages/website/ts/containers/subproviders_documentation.ts85
-rw-r--r--packages/website/ts/containers/web3_wrapper_documentation.ts63
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts211
12 files changed, 220 insertions, 606 deletions
diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts
index abf419347..8b13081c6 100644
--- a/packages/website/ts/containers/connect_documentation.ts
+++ b/packages/website/ts/containers/connect_documentation.ts
@@ -6,7 +6,6 @@ import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentatio
import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer';
import { DocPackages } from 'ts/types';
-import { constants } from 'ts/utils/constants';
import { Translate } from 'ts/utils/translate';
/* tslint:disable:no-var-requires */
@@ -14,69 +13,28 @@ const IntroMarkdownV1 = require('md/docs/connect/1.0.0/introduction');
const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation');
/* tslint:enable:no-var-requires */
-const connectDocSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
- httpClient: 'httpClient',
- webSocketOrderbookChannel: 'webSocketOrderbookChannel',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.Connect,
+ packageName: '@0xproject/connect',
type: SupportedDocJson.TypeDoc,
displayName: '0x Connect',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [connectDocSections.introduction],
- install: [connectDocSections.installation],
- httpClient: [connectDocSections.httpClient],
- webSocketOrderbookChannel: [connectDocSections.webSocketOrderbookChannel],
- types: [connectDocSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [connectDocSections.introduction]: IntroMarkdownV1,
- [connectDocSections.installation]: InstallationMarkdownV1,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
},
},
- sectionNameToModulePath: {
- [connectDocSections.httpClient]: ['"src/http_client"'],
- [connectDocSections.webSocketOrderbookChannel]: ['"src/ws_orderbook_channel"'],
- [connectDocSections.types]: ['"src/types"', '"types/src/index"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: connectDocSections,
- visibleConstructors: [connectDocSections.httpClient, connectDocSections.webSocketOrderbookChannel],
- typeConfigs: {
- typeNameToExternalLink: {
- Provider: constants.URL_WEB3_PROVIDER_DOCS,
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
- },
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'Client',
- 'FeesRequest',
- 'FeesResponse',
- 'OrderbookChannel',
- 'OrderbookChannelHandler',
- 'OrderbookChannelSubscriptionOpts',
- 'OrderbookRequest',
- 'OrderbookResponse',
- 'OrdersRequest',
- 'OrdersRequestOpts',
- 'PagedRequestOpts',
- 'TokenPairsItem',
- 'TokenPairsRequest',
- 'TokenPairsRequestOpts',
- 'TokenTradeInfo',
- 'WebSocketOrderbookChannelConfig',
- 'Order',
- 'SignedOrder',
- 'ECSignature',
- ],
- },
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts
new file mode 100644
index 000000000..fd8599192
--- /dev/null
+++ b/packages/website/ts/containers/contract_wrappers_documentation.ts
@@ -0,0 +1,66 @@
+import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs';
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { DocPackages } from 'ts/types';
+import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
+
+/* tslint:disable:no-var-requires */
+const IntroMarkdown = require('md/docs/contract_wrappers/introduction');
+const InstallMarkdown = require('md/docs/contract_wrappers/installation');
+/* tslint:enable:no-var-requires */
+
+const markdownSections = {
+ introduction: 'introduction',
+ installation: 'installation',
+};
+
+const docsInfoConfig: DocsInfoConfig = {
+ id: DocPackages.ContractWrappers,
+ packageName: '@0xproject/contract-wrappers',
+ type: SupportedDocJson.TypeDoc,
+ displayName: 'Contract Wrappers',
+ packageUrl: 'https://github.com/0xProject/0x-monorepo',
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ },
+ sectionNameToMarkdownByVersion: {
+ '0.0.1': {
+ [markdownSections.introduction]: IntroMarkdown,
+ [markdownSections.installation]: InstallMarkdown,
+ },
+ },
+ markdownSections,
+};
+const docsInfo = new DocsInfo(docsInfoConfig);
+
+interface ConnectedState {
+ docsVersion: string;
+ availableDocVersions: string[];
+ docsInfo: DocsInfo;
+ translate: Translate;
+}
+
+interface ConnectedDispatch {
+ dispatcher: Dispatcher;
+}
+
+const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
+ docsVersion: state.docsVersion,
+ availableDocVersions: state.availableDocVersions,
+ docsInfo,
+ translate: state.translate,
+});
+
+const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
+ dispatcher: new Dispatcher(dispatch),
+});
+
+export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocPageComponent,
+);
diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts
index 0be8dd3bc..e0bf9a83e 100644
--- a/packages/website/ts/containers/ethereum_types_documentation.ts
+++ b/packages/website/ts/containers/ethereum_types_documentation.ts
@@ -14,7 +14,7 @@ const IntroMarkdown = require('md/docs/ethereum_types/introduction');
const InstallationMarkdown = require('md/docs/ethereum_types/installation');
/* tslint:enable:no-var-requires */
-const docSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
types: docConstants.TYPES_SECTION_NAME,
@@ -22,78 +22,22 @@ const docSections = {
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.EthereumTypes,
+ packageName: 'ethereum-types',
type: SupportedDocJson.TypeDoc,
displayName: 'Ethereum Types',
packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/ethereum-types',
- menu: {
- introduction: [docSections.introduction],
- install: [docSections.installation],
- types: [docSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ types: [markdownSections.types],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [docSections.introduction]: IntroMarkdown,
- [docSections.installation]: InstallationMarkdown,
- },
- },
- sectionNameToModulePath: {
- [docSections.types]: ['"index"'],
- },
- visibleConstructors: [],
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'Provider',
- 'JSONRPCErrorCallback',
- 'Provider',
- 'ContractAbi',
- 'AbiDefinition',
- 'FunctionAbi',
- 'ConstructorStateMutability',
- 'StateMutability',
- 'MethodAbi',
- 'ConstructorAbi',
- 'FallbackAbi',
- 'EventParameter',
- 'EventAbi',
- 'DataItem',
- 'OpCode',
- // 'StructLog', // TODO: This type breaks the docs so we don't render it for now
- 'TransactionTrace',
- 'Unit',
- 'JSONRPCRequestPayload',
- 'JSONRPCResponsePayload',
- 'BlockWithoutTransactionData',
- 'BlockWithTransactionData',
- 'Transaction',
- 'TxData',
- 'CallData',
- 'FilterObject',
- 'LogTopic',
- 'DecodedLogEntry',
- 'DecodedLogEntryEvent',
- 'LogEntryEvent',
- 'LogEntry',
- 'TxDataPayable',
- 'TransactionReceipt',
- 'AbiType',
- 'ContractEventArg',
- 'DecodedLogArgs',
- 'LogWithDecodedArgs',
- 'RawLog',
- 'BlockParamLiteral',
- 'BlockParam',
- 'RawLogEntry',
- 'SolidityTypes',
- 'TransactionReceiptWithDecodedLogs',
- ],
- typeNameToExternalLink: {
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
+ [markdownSections.introduction]: IntroMarkdown,
+ [markdownSections.installation]: InstallationMarkdown,
},
},
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts
index fe95320a9..f32a50ea9 100644
--- a/packages/website/ts/containers/json_schemas_documentation.ts
+++ b/packages/website/ts/containers/json_schemas_documentation.ts
@@ -16,7 +16,7 @@ const SchemasMarkdownV1 = require('md/docs/json_schemas/1.0.0/schemas');
const SchemasMarkdownV2 = require('md/docs/json_schemas/2.0.0/schemas');
/* tslint:enable:no-var-requires */
-const docSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
usage: 'usage',
@@ -26,45 +26,32 @@ const docSections = {
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.JSONSchemas,
+ packageName: '@0xproject/json-schemas',
type: SupportedDocJson.TypeDoc,
displayName: 'JSON Schemas',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [docSections.introduction],
- install: [docSections.installation],
- usage: [docSections.usage],
- schemaValidator: [docSections.schemaValidator],
- schemas: [docSections.schemas],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ usage: [markdownSections.usage],
+ schemaValidator: [markdownSections.schemaValidator],
+ schemas: [markdownSections.schemas],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [docSections.introduction]: IntroMarkdownV1,
- [docSections.installation]: InstallationMarkdownV1,
- [docSections.schemas]: SchemasMarkdownV1,
- [docSections.usage]: UsageMarkdownV1,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.schemas]: SchemasMarkdownV1,
+ [markdownSections.usage]: UsageMarkdownV1,
},
'1.0.0': {
- [docSections.introduction]: IntroMarkdownV1,
- [docSections.installation]: InstallationMarkdownV1,
- [docSections.schemas]: SchemasMarkdownV2,
- [docSections.usage]: UsageMarkdownV1,
- },
- },
- sectionNameToModulePath: {
- [docSections.schemaValidator]: ['"json-schemas/src/schema_validator"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [docSections.schemaValidator],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [],
- typeNameToExternalLink: {
- Schema:
- 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49',
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.schemas]: SchemasMarkdownV2,
+ [markdownSections.usage]: UsageMarkdownV1,
},
},
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts
index c6570f514..47ac35268 100644
--- a/packages/website/ts/containers/order_utils_documentation.ts
+++ b/packages/website/ts/containers/order_utils_documentation.ts
@@ -14,61 +14,28 @@ const IntroMarkdownV1 = require('md/docs/order_utils/1.0.0/introduction');
const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation');
/* tslint:enable:no-var-requires */
-const docSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
- usage: 'usage',
- types: 'types',
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.OrderUtils,
+ packageName: '@0xproject/order-utils',
type: SupportedDocJson.TypeDoc,
displayName: 'Order utils',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [docSections.introduction],
- install: [docSections.installation],
- usage: [docSections.usage],
- types: [docSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [docSections.introduction]: IntroMarkdownV1,
- [docSections.installation]: InstallationMarkdownV1,
- },
- },
- sectionNameToModulePath: {
- [docSections.usage]: [
- '"order-utils/src/order_hash"',
- '"order-utils/src/signature_utils"',
- '"order-utils/src/order_factory"',
- '"order-utils/src/salt"',
- '"order-utils/src/assert"',
- '"order-utils/src/constants"',
- ],
- [docSections.types]: ['"order-utils/src/types"', '"types/src/index"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'OrderError',
- 'Order',
- 'SignedOrder',
- 'ECSignature',
- 'Provider',
- 'JSONRPCRequestPayload',
- 'JSONRPCResponsePayload',
- 'JSONRPCErrorCallback',
- ],
- typeNameToExternalLink: {
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
},
},
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts
new file mode 100644
index 000000000..2fa2a9d61
--- /dev/null
+++ b/packages/website/ts/containers/order_watcher_documentation.ts
@@ -0,0 +1,66 @@
+import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs';
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { DocPackages } from 'ts/types';
+import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
+
+/* tslint:disable:no-var-requires */
+const IntroMarkdown = require('md/docs/order_watcher/introduction');
+const InstallationMarkdown = require('md/docs/order_watcher/installation');
+/* tslint:enable:no-var-requires */
+
+const markdownSections = {
+ introduction: 'introduction',
+ installation: 'installation',
+};
+
+const docsInfoConfig: DocsInfoConfig = {
+ id: DocPackages.OrderWatcher,
+ packageName: '@0xproject/order-watcher',
+ type: SupportedDocJson.TypeDoc,
+ displayName: 'OrderWatcher',
+ packageUrl: 'https://github.com/0xProject/0x-monorepo',
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ },
+ sectionNameToMarkdownByVersion: {
+ '0.0.1': {
+ [markdownSections.introduction]: IntroMarkdown,
+ [markdownSections.installation]: InstallationMarkdown,
+ },
+ },
+ markdownSections,
+};
+const docsInfo = new DocsInfo(docsInfoConfig);
+
+interface ConnectedState {
+ docsVersion: string;
+ availableDocVersions: string[];
+ docsInfo: DocsInfo;
+ translate: Translate;
+}
+
+interface ConnectedDispatch {
+ dispatcher: Dispatcher;
+}
+
+const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
+ docsVersion: state.docsVersion,
+ availableDocVersions: state.availableDocVersions,
+ translate: state.translate,
+ docsInfo,
+});
+
+const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
+ dispatcher: new Dispatcher(dispatch),
+});
+
+export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocPageComponent,
+);
diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts
index b0a712477..4f4479c83 100644
--- a/packages/website/ts/containers/smart_contracts_documentation.ts
+++ b/packages/website/ts/containers/smart_contracts_documentation.ts
@@ -15,10 +15,11 @@ const IntroMarkdownV1 = require('md/docs/smart_contracts/1.0.0/introduction');
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.SmartContracts,
+ packageName: 'contracts',
type: SupportedDocJson.Doxity,
displayName: '0x Smart Contracts',
packageUrl: 'https://github.com/0xProject/contracts',
- menu: {
+ markdownMenu: {
introduction: [Sections.Introduction],
contracts: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy],
},
@@ -27,14 +28,13 @@ const docsInfoConfig: DocsInfoConfig = {
[Sections.Introduction]: IntroMarkdownV1,
},
},
- sections: {
+ markdownSections: {
Introduction: Sections.Introduction,
Exchange: Sections.Exchange,
TokenTransferProxy: Sections.TokenTransferProxy,
TokenRegistry: Sections.TokenRegistry,
ZRXToken: Sections.ZRXToken,
},
- visibleConstructors: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy],
contractsByVersionByNetworkId: {
'1.0.0': {
[Networks.Mainnet]: {
diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts
index b289c8f34..7cde68e5c 100644
--- a/packages/website/ts/containers/sol_compiler_documentation.ts
+++ b/packages/website/ts/containers/sol_compiler_documentation.ts
@@ -14,47 +14,31 @@ const InstallationMarkdownV1 = require('md/docs/sol-compiler/installation');
const UsageMarkdown = require('md/docs/sol-compiler/usage');
/* tslint:enable:no-var-requires */
-const docSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
usage: 'usage',
- compiler: 'compiler',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.SolCompiler,
+ packageName: '@0xproject/sol-compiler',
type: SupportedDocJson.TypeDoc,
displayName: 'Solidity Compiler',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [docSections.introduction],
- install: [docSections.installation],
- usage: [docSections.usage],
- compiler: [docSections.compiler],
- types: [docSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ usage: [markdownSections.usage],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [docSections.introduction]: IntroMarkdownV1,
- [docSections.installation]: InstallationMarkdownV1,
- [docSections.usage]: UsageMarkdown,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.usage]: UsageMarkdown,
},
},
- sectionNameToModulePath: {
- [docSections.compiler]: ['"sol-compiler/src/compiler"'],
- [docSections.types]: ['"sol-compiler/src/utils/types"', '"types/src/index"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [docSections.compiler],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: ['CompilerOptions'],
- typeNameToExternalLink: {},
- typeNameToPrefix: {},
- },
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts
index d78c450ed..a457cbc1e 100644
--- a/packages/website/ts/containers/sol_cov_documentation.ts
+++ b/packages/website/ts/containers/sol_cov_documentation.ts
@@ -14,76 +14,31 @@ const InstallationMarkdownV1 = require('md/docs/sol_cov/installation');
const UsageMarkdown = require('md/docs/sol_cov/usage');
/* tslint:enable:no-var-requires */
-const docSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
usage: 'usage',
- coverageSubprovider: 'coverageSubprovider',
- abstractArtifactAdapter: 'abstractArtifactAdapter',
- solCompilerArtifactAdapter: 'solCompilerArtifactAdapter',
- truffleArtifactAdapter: 'truffleArtifactAdapter',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.SolCov,
+ packageName: '@0xproject/sol-cov',
type: SupportedDocJson.TypeDoc,
displayName: 'Sol-cov',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [docSections.introduction],
- install: [docSections.installation],
- usage: [docSections.usage],
- 'coverage-subprovider': [docSections.coverageSubprovider],
- 'abstract-artifact-adapter': [docSections.abstractArtifactAdapter],
- 'sol-compiler-artifact-adapter': [docSections.solCompilerArtifactAdapter],
- 'truffle-artifact-adapter': [docSections.truffleArtifactAdapter],
- types: [docSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ usage: [markdownSections.usage],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [docSections.introduction]: IntroMarkdownV1,
- [docSections.installation]: InstallationMarkdownV1,
- [docSections.usage]: UsageMarkdown,
- },
- },
- sectionNameToModulePath: {
- [docSections.coverageSubprovider]: ['"sol-cov/src/coverage_subprovider"'],
- [docSections.abstractArtifactAdapter]: ['"sol-cov/src/artifact_adapters/abstract_artifact_adapter"'],
- [docSections.solCompilerArtifactAdapter]: ['"sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter"'],
- [docSections.truffleArtifactAdapter]: ['"sol-cov/src/artifact_adapters/truffle_artifact_adapter"'],
- [docSections.types]: ['"subproviders/src/types"', '"types/src/index"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [
- docSections.coverageSubprovider,
- docSections.abstractArtifactAdapter,
- docSections.solCompilerArtifactAdapter,
- docSections.truffleArtifactAdapter,
- ],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'JSONRPCRequestPayload',
- 'NextCallback',
- 'ErrorCallback',
- 'AbstractArtifactAdapter',
- 'CoverageSubprovider',
- 'TruffleArtifactAdapter',
- 'SolCompilerArtifactAdapter',
- 'ContractData',
- ],
- typeNameToExternalLink: {},
- typeNameToPrefix: {},
- typeNameToDocSection: {
- AbstractArtifactAdapter: docSections.abstractArtifactAdapter,
- CoverageSubprovider: docSections.coverageSubprovider,
- TruffleArtifactAdapter: docSections.truffleArtifactAdapter,
- SolCompilerArtifactAdapter: docSections.solCompilerArtifactAdapter,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.usage]: UsageMarkdown,
},
},
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts
index 0e9150d7b..43f06b4ed 100644
--- a/packages/website/ts/containers/subproviders_documentation.ts
+++ b/packages/website/ts/containers/subproviders_documentation.ts
@@ -18,44 +18,19 @@ const LedgerNodeHidMarkdown = require('md/docs/subproviders/ledger_node_hid');
const docSections = {
introduction: 'introduction',
installation: 'installation',
- subprovider: 'subprovider',
- ledgerSubprovider: 'ledgerSubprovider',
ledgerNodeHid: 'ledger-node-hid-issue',
- factoryMethods: 'factory-methods',
- emptyWalletSubprovider: 'emptyWalletSubprovider',
- fakeGasEstimateSubprovider: 'fakeGasEstimateSubprovider',
- injectedWeb3Subprovider: 'injectedWeb3Subprovider',
- signerSubprovider: 'signerSubprovider',
- redundantRPCSubprovider: 'redundantRPCSubprovider',
- ganacheSubprovider: 'ganacheSubprovider',
- nonceTrackerSubprovider: 'nonceTrackerSubprovider',
- privateKeyWalletSubprovider: 'privateKeyWalletSubprovider',
- mnemonicWalletSubprovider: 'mnemonicWalletSubprovider',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.Subproviders,
+ packageName: '@0xproject/subproviders',
type: SupportedDocJson.TypeDoc,
displayName: 'Subproviders',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
+ markdownMenu: {
introduction: [docSections.introduction],
install: [docSections.installation],
- subprovider: [docSections.subprovider],
- ['ledger-subprovider']: [docSections.ledgerSubprovider],
['ledger-node-hid-issue']: [docSections.ledgerNodeHid],
- ['private-key-wallet-subprovider']: [docSections.privateKeyWalletSubprovider],
- ['mnemonic-wallet-subprovider']: [docSections.mnemonicWalletSubprovider],
- ['factory-methods']: [docSections.factoryMethods],
- ['emptyWallet-subprovider']: [docSections.emptyWalletSubprovider],
- ['fakeGasEstimate-subprovider']: [docSections.fakeGasEstimateSubprovider],
- ['injectedWeb3-subprovider']: [docSections.injectedWeb3Subprovider],
- ['signer-subprovider']: [docSections.signerSubprovider],
- ['redundantRPC-subprovider']: [docSections.redundantRPCSubprovider],
- ['ganache-subprovider']: [docSections.ganacheSubprovider],
- ['nonceTracker-subprovider']: [docSections.nonceTrackerSubprovider],
- types: [docSections.types],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
@@ -64,61 +39,7 @@ const docsInfoConfig: DocsInfoConfig = {
[docSections.ledgerNodeHid]: LedgerNodeHidMarkdown,
},
},
- sectionNameToModulePath: {
- [docSections.subprovider]: ['"subproviders/src/subproviders/subprovider"'],
- [docSections.ledgerSubprovider]: ['"subproviders/src/subproviders/ledger"'],
- [docSections.privateKeyWalletSubprovider]: ['"subproviders/src/subproviders/private_key_wallet"'],
- [docSections.mnemonicWalletSubprovider]: ['"subproviders/src/subproviders/mnemonic_wallet"'],
- [docSections.factoryMethods]: ['"subproviders/src/index"'],
- [docSections.emptyWalletSubprovider]: ['"subproviders/src/subproviders/empty_wallet_subprovider"'],
- [docSections.fakeGasEstimateSubprovider]: ['"subproviders/src/subproviders/fake_gas_estimate_subprovider"'],
- [docSections.injectedWeb3Subprovider]: ['"subproviders/src/subproviders/injected_web3"'],
- [docSections.signerSubprovider]: ['"subproviders/src/subproviders/signer"'],
- [docSections.redundantRPCSubprovider]: ['"subproviders/src/subproviders/redundant_rpc"'],
- [docSections.ganacheSubprovider]: ['"subproviders/src/subproviders/ganache"'],
- [docSections.nonceTrackerSubprovider]: ['"subproviders/src/subproviders/nonce_tracker"'],
- [docSections.types]: ['"sol-compiler/src/utils/types"', '"types/src/index"', '"subproviders/src/types"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [
- docSections.subprovider,
- docSections.ledgerSubprovider,
- docSections.privateKeyWalletSubprovider,
- docSections.mnemonicWalletSubprovider,
- docSections.emptyWalletSubprovider,
- docSections.fakeGasEstimateSubprovider,
- docSections.injectedWeb3Subprovider,
- docSections.redundantRPCSubprovider,
- docSections.ganacheSubprovider,
- docSections.nonceTrackerSubprovider,
- ],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'Callback',
- 'NextCallback',
- 'ErrorCallback',
- 'ECSignature',
- 'JSONRPCRequestPayloadWithMethod',
- 'JSONRPCRequestPayload',
- 'JSONRPCResponsePayload',
- 'AccountFetchingConfigs',
- 'LedgerEthereumClientFactoryAsync',
- 'PartialTxParams',
- 'LedgerEthereumClient',
- 'LedgerSubproviderConfigs',
- 'MnemonicWalletSubproviderConfigs',
- 'OnNextCompleted',
- 'Provider',
- ],
- typeNameToExternalLink: {
- Web3: constants.URL_WEB3_DOCS,
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
- },
- typeNameToPrefix: {},
- },
+ markdownSections: docSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts
index 8d98d9476..13924fde8 100644
--- a/packages/website/ts/containers/web3_wrapper_documentation.ts
+++ b/packages/website/ts/containers/web3_wrapper_documentation.ts
@@ -17,20 +17,17 @@ const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation');
const docSections = {
introduction: 'introduction',
installation: 'installation',
- web3Wrapper: 'web3Wrapper',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.Web3Wrapper,
+ packageName: '@0xproject/web3-wrapper',
type: SupportedDocJson.TypeDoc,
displayName: 'Web3Wrapper',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
+ markdownMenu: {
introduction: [docSections.introduction],
install: [docSections.installation],
- web3Wrapper: [docSections.web3Wrapper],
- types: [docSections.types],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
@@ -38,61 +35,7 @@ const docsInfoConfig: DocsInfoConfig = {
[docSections.installation]: InstallationMarkdownV1,
},
},
- sectionNameToModulePath: {
- [docSections.web3Wrapper]: ['"web3-wrapper/src/web3_wrapper"'],
- [docSections.types]: ['"types/src/index"'],
- },
- menuSubsectionToVersionWhenIntroduced: {},
- sections: docSections,
- visibleConstructors: [docSections.web3Wrapper],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :(
- publicTypes: [
- 'TxData',
- 'TransactionReceipt',
- 'RawLogEntry',
- 'ContractAbi',
- 'BlockParam',
- 'FilterObject',
- 'LogEntry',
- 'BlockWithoutTransactionData',
- 'CallData',
- 'LogEntryEvent',
- 'Provider',
- 'AbiDefinition',
- 'LogTopic',
- 'JSONRPCRequestPayload',
- 'JSONRPCResponsePayload',
- 'BlockParamLiteral',
- 'FunctionAbi',
- 'EventAbi',
- 'JSONRPCErrorCallback',
- 'MethodAbi',
- 'ConstructorAbi',
- 'FallbackAbi',
- 'EventParameter',
- 'DataItem',
- 'StateMutability',
- 'Function',
- 'Fallback',
- 'Constructor',
- 'Event',
- 'ConstructorStateMutability',
- 'TransactionReceiptWithDecodedLogs',
- 'DecodedLogArgs',
- 'LogWithDecodedArgs',
- 'ContractEventArg',
- ],
- typeNameToExternalLink: {
- Web3: constants.URL_WEB3_DOCS,
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
- },
- typeNameToPrefix: {},
- typeNameToDocSection: {
- Web3Wrapper: docSections.web3Wrapper,
- },
- },
+ markdownSections: docSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts
index 6be54595d..367d3e064 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.ts
+++ b/packages/website/ts/containers/zero_ex_js_documentation.ts
@@ -20,221 +20,44 @@ const IntroMarkdownV2 = require('md/docs/0xjs/2.0.0/introduction');
const versioningMarkdownV2 = require('md/docs/0xjs/2.0.0/versioning');
/* tslint:enable:no-var-requires */
-const zeroExJsDocSections = {
+const markdownSections = {
introduction: 'introduction',
installation: 'installation',
testrpc: 'testrpc',
async: 'async',
errors: 'errors',
versioning: 'versioning',
- zeroEx: 'zeroEx',
- exchange: 'exchange',
- token: 'token',
- tokenRegistry: 'tokenRegistry',
- etherToken: 'etherToken',
- proxy: 'proxy',
- orderWatcher: 'orderWatcher',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
id: DocPackages.ZeroExJs,
+ packageName: '0x.js',
type: SupportedDocJson.TypeDoc,
displayName: '0x.js',
packageUrl: 'https://github.com/0xProject/0x-monorepo',
- menu: {
- introduction: [zeroExJsDocSections.introduction],
- install: [zeroExJsDocSections.installation],
- topics: [zeroExJsDocSections.async, zeroExJsDocSections.errors, zeroExJsDocSections.versioning],
- zeroEx: [zeroExJsDocSections.zeroEx],
- contracts: [
- zeroExJsDocSections.exchange,
- zeroExJsDocSections.token,
- zeroExJsDocSections.tokenRegistry,
- zeroExJsDocSections.etherToken,
- zeroExJsDocSections.proxy,
- ],
- orderWatcher: [zeroExJsDocSections.orderWatcher],
- types: [zeroExJsDocSections.types],
+ markdownMenu: {
+ introduction: [markdownSections.introduction],
+ install: [markdownSections.installation],
+ topics: [markdownSections.async, markdownSections.errors, markdownSections.versioning],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
- [zeroExJsDocSections.introduction]: IntroMarkdownV1,
- [zeroExJsDocSections.installation]: InstallationMarkdownV1,
- [zeroExJsDocSections.async]: AsyncMarkdownV1,
- [zeroExJsDocSections.errors]: ErrorsMarkdownV1,
- [zeroExJsDocSections.versioning]: versioningMarkdownV1,
+ [markdownSections.introduction]: IntroMarkdownV1,
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.async]: AsyncMarkdownV1,
+ [markdownSections.errors]: ErrorsMarkdownV1,
+ [markdownSections.versioning]: versioningMarkdownV1,
},
'1.0.0-rc.1': {
- [zeroExJsDocSections.introduction]: IntroMarkdownV2,
- [zeroExJsDocSections.versioning]: versioningMarkdownV2,
+ [markdownSections.introduction]: IntroMarkdownV2,
+ [markdownSections.versioning]: versioningMarkdownV2,
// These are the same as for V1
- [zeroExJsDocSections.installation]: InstallationMarkdownV1,
- [zeroExJsDocSections.async]: AsyncMarkdownV1,
- [zeroExJsDocSections.errors]: ErrorsMarkdownV1,
- },
- },
- sectionNameToModulePath: {
- [zeroExJsDocSections.zeroEx]: ['"0x.js/src/0x"', '"src/0x"'],
- [zeroExJsDocSections.exchange]: [
- '"0x.js/src/contract_wrappers/exchange_wrapper"',
- '"src/contract_wrappers/exchange_wrapper"',
- '"contract-wrappers/src/contract_wrappers/exchange_wrapper"',
- ],
- [zeroExJsDocSections.tokenRegistry]: [
- '"0x.js/src/contract_wrappers/token_registry_wrapper"',
- '"src/contract_wrappers/token_registry_wrapper"',
- '"contract-wrappers/src/contract_wrappers/token_registry_wrapper"',
- ],
- [zeroExJsDocSections.token]: [
- '"0x.js/src/contract_wrappers/token_wrapper"',
- '"src/contract_wrappers/token_wrapper"',
- '"contract-wrappers/src/contract_wrappers/token_wrapper"',
- ],
- [zeroExJsDocSections.etherToken]: [
- '"0x.js/src/contract_wrappers/ether_token_wrapper"',
- '"src/contract_wrappers/ether_token_wrapper"',
- '"contract-wrappers/src/contract_wrappers/ether_token_wrapper"',
- ],
- [zeroExJsDocSections.proxy]: [
- '"0x.js/src/contract_wrappers/proxy_wrapper"',
- '"0x.js/src/contract_wrappers/token_transfer_proxy_wrapper"',
- '"contract-wrappers/src/contract_wrappers/token_transfer_proxy_wrapper"',
- ],
- [zeroExJsDocSections.orderWatcher]: [
- '"0x.js/src/order_watcher/order_state_watcher"',
- '"src/order_watcher/order_state_watcher"',
- '"order-watcher/src/order_watcher/order_watcher"',
- ],
- [zeroExJsDocSections.types]: [
- '"0x.js/src/types"',
- '"src/types"',
- '"types/src/index"',
- '"contract-wrappers/src/types"',
- '"0x.js/src/contract_wrappers/generated/ether_token"',
- '"0x.js/src/contract_wrappers/generated/token"',
- '"0x.js/src/contract_wrappers/generated/exchange"',
- '"0x.js/src/generated_contract_wrappers/ether_token"',
- '"0x.js/src/generated_contract_wrappers/token"',
- '"0x.js/src/generated_contract_wrappers/exchange"',
- ],
- },
- menuSubsectionToVersionWhenIntroduced: {
- [zeroExJsDocSections.etherToken]: '0.7.1',
- [zeroExJsDocSections.proxy]: '0.8.0',
- [zeroExJsDocSections.orderWatcher]: '0.27.1',
- },
- sections: zeroExJsDocSections,
- visibleConstructors: [zeroExJsDocSections.zeroEx],
- typeConfigs: {
- // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is
- // currently no way to extract the re-exported types from index.ts via TypeDoc :( Make sure to only
- // ADD types here, DO NOT REMOVE types since they might still be needed for older supported versions
- publicTypes: [
- 'Order',
- 'SignedOrder',
- 'ECSignature',
- 'ContractWrappersError',
- 'EventCallback',
- 'EventCallbackAsync',
- 'EventCallbackSync',
- 'ExchangeContractErrs',
- 'ContractEvent',
- 'Token',
- 'Provider',
- 'ExchangeEvents',
- 'IndexedFilterValues',
- 'SubscriptionOpts',
- 'BlockRange',
- 'BlockParam',
- 'OrderFillOrKillRequest',
- 'OrderCancellationRequest',
- 'OrderFillRequest',
- 'ContractEventEmitter',
- 'Web3Provider',
- 'ContractEventArgs',
- 'LogCancelArgs',
- 'LogFillArgs',
- 'LogErrorContractEventArgs',
- 'LogFillContractEventArgs',
- 'LogCancelContractEventArgs',
- 'EtherTokenContractEventArgs',
- 'WithdrawalContractEventArgs',
- 'DepositContractEventArgs',
- 'TokenEvents',
- 'ExchangeContractEventArgs',
- 'TransferContractEventArgs',
- 'ApprovalContractEventArgs',
- 'TokenContractEventArgs',
- 'ZeroExConfig',
- 'TransactionReceipt',
- 'TransactionReceiptWithDecodedLogs',
- 'LogWithDecodedArgs',
- 'EtherTokenEvents',
- 'BlockParamLiteral',
- 'DecodedLogArgs',
- 'MethodOpts',
- 'ValidateOrderFillableOpts',
- 'OrderTransactionOpts',
- 'TransactionOpts',
- 'ContractEventArg',
- 'LogEvent',
- 'DecodedLogEvent',
- 'EventWatcherCallback',
- 'OnOrderStateChangeCallback',
- 'OrderStateValid',
- 'OrderStateInvalid',
- 'OrderState',
- 'OrderStateWatcherConfig',
- 'OrderWatcherConfig',
- 'FilterObject',
- 'OrderRelevantState',
- 'JSONRPCRequestPayload',
- 'JSONRPCResponsePayload',
- 'JSONRPCErrorCallback',
- 'LogEntryEvent',
- 'LogEntry',
- 'ERC20AssetData',
- 'ERC721AssetData',
- 'AssetProxyId',
- 'WETH9Events',
- 'WETH9WithdrawalEventArgs',
- 'WETH9ApprovalEventArgs',
- 'WETH9EventArgs',
- 'WETH9DepositEventArgs',
- 'WETH9TransferEventArgs',
- 'ERC20TokenTransferEventArgs',
- 'ERC20TokenApprovalEventArgs',
- 'ERC20TokenEvents',
- 'ERC20TokenEventArgs',
- 'ERC721TokenApprovalEventArgs',
- 'ERC721TokenApprovalForAllEventArgs',
- 'ERC721TokenTransferEventArgs',
- 'ERC721TokenEvents',
- 'ExchangeCancelUpToEventArgs',
- 'ExchangeAssetProxyRegisteredEventArgs',
- 'ExchangeFillEventArgs',
- 'ExchangeCancelEventArgs',
- 'ExchangeEventArgs',
- 'ContractWrappersConfig',
- 'MessagePrefixType',
- 'MessagePrefixOpts',
- 'OrderInfo',
- ],
- typeNameToPrefix: {},
- typeNameToExternalLink: {
- BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
- },
- typeNameToDocSection: {
- ExchangeWrapper: 'exchange',
- TokenWrapper: 'token',
- TokenRegistryWrapper: 'tokenRegistry',
- EtherTokenWrapper: 'etherToken',
- ProxyWrapper: 'proxy',
- TokenTransferProxyWrapper: 'proxy',
- OrderStateWatcher: 'orderWatcher',
+ [markdownSections.installation]: InstallationMarkdownV1,
+ [markdownSections.async]: AsyncMarkdownV1,
+ [markdownSections.errors]: ErrorsMarkdownV1,
},
},
+ markdownSections,
};
const docsInfo = new DocsInfo(docsInfoConfig);