aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-16 11:09:53 +0800
committerFabio Berger <me@fabioberger.com>2018-02-16 11:09:53 +0800
commite2b51c5dc46b30b21e0561689de1f9a3d0127554 (patch)
treec8f93b5700961a46b16e49e52d159c989c11102d /packages/website
parentb610b7c1923dcc56883c5167393122ceaed26708 (diff)
parentb75fdd6b66a30196d53331827733b863bed770f0 (diff)
downloaddexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.gz
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.bz2
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.lz
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.xz
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.zst
dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.zip
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js: (24 commits) Rename variables Update CHANGELOG Add npm config for contracts list Run prettier Fix checks, add contract list to compile script in package.json Add contracts to compiler options Add missing public types from connect docs Change imports order Change default page params in connect to page 1 and perPage 100 Add docs staging to 0x.js package Fix a typo Add an assertion Add PR numbers Fix entry points Add tests for dev-utils package Move subproviders from dev-utils to subproviders Add missing CHANGELOG entry Add support for intersection types in docs Add stagedocs script to connect package web3 typings fix - web3.net.peerCount returns number ...
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/containers/connect_documentation.tsx12
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.tsx8
-rw-r--r--packages/website/ts/pages/documentation/type.tsx17
-rw-r--r--packages/website/ts/types.ts1
4 files changed, 34 insertions, 4 deletions
diff --git a/packages/website/ts/containers/connect_documentation.tsx b/packages/website/ts/containers/connect_documentation.tsx
index 3e02a7d05..fd3029970 100644
--- a/packages/website/ts/containers/connect_documentation.tsx
+++ b/packages/website/ts/containers/connect_documentation.tsx
@@ -6,7 +6,8 @@ import { DocsInfo } from 'ts/pages/documentation/docs_info';
import { Documentation as DocumentationComponent, DocumentationAllProps } from 'ts/pages/documentation/documentation';
import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer';
-import { DocsInfoConfig, WebsitePaths } from 'ts/types';
+import { DocsInfoConfig, Environments, WebsitePaths } from 'ts/types';
+import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
import { typeDocUtils } from 'ts/utils/typedoc_utils';
@@ -23,12 +24,16 @@ const connectDocSections = {
types: constants.TYPES_SECTION_NAME,
};
+const s3BucketName =
+ configs.ENVIRONMENT === Environments.DEVELOPMENT ? 'staging-connect-docs-jsons' : 'connect-docs-jsons';
+const docsJsonRoot = `https://s3.amazonaws.com/${s3BucketName}`;
+
const docsInfoConfig: DocsInfoConfig = {
displayName: '0x Connect',
subPackageName: 'connect',
packageUrl: 'https://github.com/0xProject/0x.js',
websitePath: WebsitePaths.Connect,
- docsJsonRoot: 'https://s3.amazonaws.com/connect-docs-jsons',
+ docsJsonRoot,
menu: {
introduction: [connectDocSections.introduction],
install: [connectDocSections.installation],
@@ -52,8 +57,11 @@ const docsInfoConfig: DocsInfoConfig = {
'OrderbookRequest',
'OrderbookResponse',
'OrdersRequest',
+ 'OrdersRequestOpts',
+ 'PagedRequestOpts',
'TokenPairsItem',
'TokenPairsRequest',
+ 'TokenPairsRequestOpts',
'TokenTradeInfo',
'Order',
'SignedOrder',
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.tsx b/packages/website/ts/containers/zero_ex_js_documentation.tsx
index 96c8c257d..eee2c7cc8 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.tsx
+++ b/packages/website/ts/containers/zero_ex_js_documentation.tsx
@@ -6,7 +6,8 @@ import { DocsInfo } from 'ts/pages/documentation/docs_info';
import { Documentation as DocumentationComponent, DocumentationAllProps } from 'ts/pages/documentation/documentation';
import { Dispatcher } from 'ts/redux/dispatcher';
import { State } from 'ts/redux/reducer';
-import { DocsInfoConfig, WebsitePaths } from 'ts/types';
+import { DocsInfoConfig, Environments, WebsitePaths } from 'ts/types';
+import { configs } from 'ts/utils/configs';
import { constants } from 'ts/utils/constants';
import { typeDocUtils } from 'ts/utils/typedoc_utils';
@@ -35,12 +36,15 @@ const zeroExJsDocSections = {
types: constants.TYPES_SECTION_NAME,
};
+const s3BucketName = configs.ENVIRONMENT === Environments.DEVELOPMENT ? 'staging-0xjs-docs-jsons' : '0xjs-docs-jsons';
+const docsJsonRoot = `https://s3.amazonaws.com/${s3BucketName}`;
+
const docsInfoConfig: DocsInfoConfig = {
displayName: '0x.js',
packageUrl: 'https://github.com/0xProject/0x.js',
subPackageName: '0x.js',
websitePath: WebsitePaths.ZeroExJs,
- docsJsonRoot: 'https://s3.amazonaws.com/0xjs-docs-jsons',
+ docsJsonRoot,
menu: {
introduction: [zeroExJsDocSections.introduction],
install: [zeroExJsDocSections.installation],
diff --git a/packages/website/ts/pages/documentation/type.tsx b/packages/website/ts/pages/documentation/type.tsx
index e989e7129..b306fa053 100644
--- a/packages/website/ts/pages/documentation/type.tsx
+++ b/packages/website/ts/pages/documentation/type.tsx
@@ -118,6 +118,23 @@ export function Type(props: TypeProps): any {
typeName = type.name;
break;
+ case TypeDocTypes.Intersection:
+ const intersectionsTypes = _.map(type.types, t => {
+ return (
+ <Type
+ key={`type-${t.name}-${t.value}-${t.typeDocType}`}
+ type={t}
+ sectionName={props.sectionName}
+ typeDefinitionByName={props.typeDefinitionByName}
+ docsInfo={props.docsInfo}
+ />
+ );
+ });
+ typeName = _.reduce(intersectionsTypes, (prev: React.ReactNode, curr: React.ReactNode) => {
+ return [prev, '&', curr];
+ });
+ break;
+
default:
throw utils.spawnSwitchErr('type.typeDocType', type.typeDocType);
}
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 19fc24852..645c9cc11 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -324,6 +324,7 @@ export enum TypeDocTypes {
Reflection = 'reflection',
Union = 'union',
TypeParameter = 'typeParameter',
+ Intersection = 'intersection',
Unknown = 'unknown',
}