diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-22 23:11:42 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-22 23:11:42 +0800 |
commit | 7c29cadb1722b7ac6df7db8c947cc5eaad24edaf (patch) | |
tree | 02174f7c36879fb4bd3cfba99f554bfb29e5efb6 /packages | |
parent | 40b202f8c0907cb729cc0d7d755a6810c8b1ff06 (diff) | |
download | dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar.gz dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar.bz2 dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar.lz dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar.xz dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.tar.zst dexon-0x-contracts-7c29cadb1722b7ac6df7db8c947cc5eaad24edaf.zip |
Use actual packageName for external example imports
Diffstat (limited to 'packages')
15 files changed, 17 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 0adadb30b..9d9b5141a 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -322,7 +322,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta <a href={link} target="_blank" style={{ color: colors.lightBlueA700, textDecoration: 'none' }}> {exportName} </a> - {` } from '${this.props.docsInfo.displayName}'`} + {` } from '${this.props.docsInfo.packageName}'`} </code> </div> ); diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 9e990ffc5..f429a34cb 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -21,6 +21,7 @@ export class DocsInfo { public id: string; public type: SupportedDocJson; public displayName: string; + public packageName: string; public packageUrl: string; public menu: DocsMenu; public sections: SectionsMap; @@ -31,6 +32,7 @@ export class DocsInfo { this.type = config.type; this.menu = config.markdownMenu; this.displayName = config.displayName; + this.packageName = config.packageName; this.packageUrl = config.packageUrl; this.sections = config.markdownSections; this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 8352af876..7fd785e32 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -4,6 +4,7 @@ export interface SectionNameToMarkdownByVersion { export interface DocsInfoConfig { id: string; + packageName: string; type: SupportedDocJson; displayName: string; packageUrl: string; @@ -309,6 +310,7 @@ export interface Metadata { } export interface GeneratedDocJson { + version: string; metadata: Metadata; typedocJson: TypeDocNode; } diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index fffc60435..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 */ @@ -21,6 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Connect, + packageName: '@0xproject/connect', type: SupportedDocJson.TypeDoc, displayName: '0x Connect', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 68bb4b1f0..fd8599192 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ContractWrappers, + packageName: '@0xproject/contract-wrappers', type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 3e23899af..e0bf9a83e 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { 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', diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 6b0089213..389c26687 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -25,6 +25,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.JSONSchemas, + packageName: '@0xproject/json-schemas', type: SupportedDocJson.TypeDoc, displayName: 'JSON Schemas', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 444ca5f2d..47ac35268 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderUtils, + packageName: '@0xproject/order-utils', type: SupportedDocJson.TypeDoc, displayName: 'Order utils', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 8a32fe595..2fa2a9d61 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderWatcher, + packageName: '@0xproject/order-watcher', type: SupportedDocJson.TypeDoc, displayName: 'OrderWatcher', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index a2b3545ae..4f4479c83 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -15,6 +15,7 @@ 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', diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 48e5b1e1c..7cde68e5c 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCompiler, + packageName: '@0xproject/sol-compiler', type: SupportedDocJson.TypeDoc, displayName: 'Solidity Compiler', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 9e3c7489b..a457cbc1e 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCov, + packageName: '@0xproject/sol-cov', type: SupportedDocJson.TypeDoc, displayName: 'Sol-cov', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index cbbc89a2b..43f06b4ed 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -23,6 +23,7 @@ const docSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Subproviders, + packageName: '@0xproject/subproviders', type: SupportedDocJson.TypeDoc, displayName: 'Subproviders', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 0398e0493..13924fde8 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -21,6 +21,7 @@ const docSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Web3Wrapper, + packageName: '@0xproject/web3-wrapper', type: SupportedDocJson.TypeDoc, displayName: 'Web3Wrapper', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 90b70b8ed..367d3e064 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -31,6 +31,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ZeroExJs, + packageName: '0x.js', type: SupportedDocJson.TypeDoc, displayName: '0x.js', packageUrl: 'https://github.com/0xProject/0x-monorepo', |