diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-07-21 07:15:04 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-07-21 07:15:04 +0800 |
commit | 6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8 (patch) | |
tree | 7b6a6eb86d6a0463221a502fb886bae6ff5a243c /packages/website/ts | |
parent | 938aabde3db0044c658e86765e1bbdbdce4e4a17 (diff) | |
parent | e54501522dcf93521c8ff7dfe5b216cffeaa1b29 (diff) | |
download | dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.gz dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.zst dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.zip |
Merge branch 'v2-prototype' into feature/website/jobs-page-part2
* v2-prototype: (103 commits)
Add changelog entry for @0xproject/utils
Add AbortController polyfill to fetchAsync in utils
Increase node heap size for webpack command
Add missing timestamp to CHANGELOG entries
Upgrade some @0xproject packages to 1.0.0 in website
Hard code fillOrder selector into abiEncodeFillOrder
Returns byte array instead of memory range for encoding fillOrder calldata
Created LibAbiEncoder with `fillOrderNoThrow`
Add missing dep in migrations
Fix the abi-gen entry point
Fix linter error
Remove the postinstall hook
Update website package.json with original imports
@0xproject/sra-report@1.0.0
Change all package to depend on the new @0xproject/connect@1.0.0
@0xproject/connect@1.0.0
Use old assert version in @0xproject/connect
FIx a typo
Remove rc versions from unmigrated packages
0x.js@1.0.0-rc.2
...
Diffstat (limited to 'packages/website/ts')
11 files changed, 91 insertions, 61 deletions
diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index f939ef0df..abf419347 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/connect/introduction'); -const InstallationMarkdown = require('md/docs/connect/installation'); +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 = { @@ -34,9 +34,11 @@ const docsInfoConfig: DocsInfoConfig = { webSocketOrderbookChannel: [connectDocSections.webSocketOrderbookChannel], types: [connectDocSections.types], }, - sectionNameToMarkdown: { - [connectDocSections.introduction]: IntroMarkdown, - [connectDocSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [connectDocSections.introduction]: IntroMarkdownV1, + [connectDocSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [connectDocSections.httpClient]: ['"src/http_client"'], diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 285438835..0be8dd3bc 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -30,9 +30,11 @@ const docsInfoConfig: DocsInfoConfig = { install: [docSections.installation], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdown, + [docSections.installation]: InstallationMarkdown, + }, }, sectionNameToModulePath: { [docSections.types]: ['"index"'], diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 67740d4c6..523777114 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -9,10 +9,10 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/json_schemas/introduction'); -const InstallationMarkdown = require('md/docs/json_schemas/installation'); -const UsageMarkdown = require('md/docs/json_schemas/usage'); -const SchemasMarkdown = require('md/docs/json_schemas/schemas'); +const IntroMarkdownV1 = require('md/docs/json_schemas/1.0.0/introduction'); +const InstallationMarkdownV1 = require('md/docs/json_schemas/1.0.0/installation'); +const UsageMarkdownV1 = require('md/docs/json_schemas/1.0.0/usage'); +const SchemasMarkdownV1 = require('md/docs/json_schemas/1.0.0/schemas'); /* tslint:enable:no-var-requires */ const docSections = { @@ -35,11 +35,13 @@ const docsInfoConfig: DocsInfoConfig = { schemaValidator: [docSections.schemaValidator], schemas: [docSections.schemas], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.schemas]: SchemasMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.schemas]: SchemasMarkdownV1, + [docSections.usage]: UsageMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.schemaValidator]: ['"json-schemas/src/schema_validator"'], diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 37b7f2273..c6570f514 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/order_utils/introduction'); -const InstallationMarkdown = require('md/docs/order_utils/installation'); +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 = { @@ -32,9 +32,11 @@ const docsInfoConfig: DocsInfoConfig = { usage: [docSections.usage], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.usage]: [ diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index c88c3b365..b0a712477 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -10,7 +10,7 @@ import { DocPackages, SmartContractDocSections as Sections } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/smart_contracts/introduction'); +const IntroMarkdownV1 = require('md/docs/smart_contracts/1.0.0/introduction'); /* tslint:enable:no-var-requires */ const docsInfoConfig: DocsInfoConfig = { @@ -22,8 +22,10 @@ const docsInfoConfig: DocsInfoConfig = { introduction: [Sections.Introduction], contracts: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy], }, - sectionNameToMarkdown: { - [Sections.Introduction]: IntroMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [Sections.Introduction]: IntroMarkdownV1, + }, }, sections: { Introduction: Sections.Introduction, diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 8720e2c1d..b289c8f34 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -9,8 +9,8 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/sol-compiler/introduction'); -const InstallationMarkdown = require('md/docs/sol-compiler/installation'); +const IntroMarkdownV1 = require('md/docs/sol-compiler/introduction'); +const InstallationMarkdownV1 = require('md/docs/sol-compiler/installation'); const UsageMarkdown = require('md/docs/sol-compiler/usage'); /* tslint:enable:no-var-requires */ @@ -34,10 +34,12 @@ const docsInfoConfig: DocsInfoConfig = { compiler: [docSections.compiler], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.usage]: UsageMarkdown, + }, }, sectionNameToModulePath: { [docSections.compiler]: ['"sol-compiler/src/compiler"'], diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index a8009071f..d78c450ed 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -9,8 +9,8 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/sol_cov/introduction'); -const InstallationMarkdown = require('md/docs/sol_cov/installation'); +const IntroMarkdownV1 = require('md/docs/sol_cov/introduction'); +const InstallationMarkdownV1 = require('md/docs/sol_cov/installation'); const UsageMarkdown = require('md/docs/sol_cov/usage'); /* tslint:enable:no-var-requires */ @@ -40,10 +40,12 @@ const docsInfoConfig: DocsInfoConfig = { 'truffle-artifact-adapter': [docSections.truffleArtifactAdapter], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.usage]: UsageMarkdown, + }, }, sectionNameToModulePath: { [docSections.coverageSubprovider]: ['"sol-cov/src/coverage_subprovider"'], diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 567f6a37e..0e9150d7b 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/subproviders/introduction'); -const InstallationMarkdown = require('md/docs/subproviders/installation'); +const IntroMarkdownV1 = require('md/docs/subproviders/introduction'); +const InstallationMarkdownV1 = require('md/docs/subproviders/installation'); const LedgerNodeHidMarkdown = require('md/docs/subproviders/ledger_node_hid'); /* tslint:enable:no-var-requires */ @@ -57,10 +57,12 @@ const docsInfoConfig: DocsInfoConfig = { ['nonceTracker-subprovider']: [docSections.nonceTrackerSubprovider], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, + }, }, sectionNameToModulePath: { [docSections.subprovider]: ['"subproviders/src/subproviders/subprovider"'], diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index b04a83ac4..8d98d9476 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/web3_wrapper/introduction'); -const InstallationMarkdown = require('md/docs/web3_wrapper/installation'); +const IntroMarkdownV1 = require('md/docs/web3_wrapper/introduction'); +const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation'); /* tslint:enable:no-var-requires */ const docSections = { @@ -32,9 +32,11 @@ const docsInfoConfig: DocsInfoConfig = { web3Wrapper: [docSections.web3Wrapper], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.web3Wrapper]: ['"web3-wrapper/src/web3_wrapper"'], diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 9d3be56f5..6be54595d 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -10,11 +10,14 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/0xjs/introduction'); -const InstallationMarkdown = require('md/docs/0xjs/installation'); -const AsyncMarkdown = require('md/docs/0xjs/async'); -const ErrorsMarkdown = require('md/docs/0xjs/errors'); -const versioningMarkdown = require('md/docs/0xjs/versioning'); +const IntroMarkdownV1 = require('md/docs/0xjs/1.0.0/introduction'); +const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.0/installation'); +const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.0/async'); +const ErrorsMarkdownV1 = require('md/docs/0xjs/1.0.0/errors'); +const versioningMarkdownV1 = require('md/docs/0xjs/1.0.0/versioning'); + +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 = { @@ -54,12 +57,22 @@ const docsInfoConfig: DocsInfoConfig = { orderWatcher: [zeroExJsDocSections.orderWatcher], types: [zeroExJsDocSections.types], }, - sectionNameToMarkdown: { - [zeroExJsDocSections.introduction]: IntroMarkdown, - [zeroExJsDocSections.installation]: InstallationMarkdown, - [zeroExJsDocSections.async]: AsyncMarkdown, - [zeroExJsDocSections.errors]: ErrorsMarkdown, - [zeroExJsDocSections.versioning]: versioningMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [zeroExJsDocSections.introduction]: IntroMarkdownV1, + [zeroExJsDocSections.installation]: InstallationMarkdownV1, + [zeroExJsDocSections.async]: AsyncMarkdownV1, + [zeroExJsDocSections.errors]: ErrorsMarkdownV1, + [zeroExJsDocSections.versioning]: versioningMarkdownV1, + }, + '1.0.0-rc.1': { + [zeroExJsDocSections.introduction]: IntroMarkdownV2, + [zeroExJsDocSections.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"'], diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts index 1627b9b0c..b9084bba7 100644 --- a/packages/website/ts/utils/doc_utils.ts +++ b/packages/website/ts/utils/doc_utils.ts @@ -1,6 +1,5 @@ import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs'; import { fetchAsync, logUtils } from '@0xproject/utils'; -import findVersions = require('find-versions'); import * as _ from 'lodash'; import { S3FileObject, VersionToFilePath } from 'ts/types'; import convert = require('xml-js'); @@ -10,7 +9,7 @@ export const docUtils = { const versionFilePaths = await docUtils.getVersionFileNamesAsync(s3DocJsonRoot, folderName); const versionToFilePath: VersionToFilePath = {}; _.each(versionFilePaths, filePath => { - const [version] = findVersions(filePath); + const version = filePath.split('/v')[1].replace('.json', ''); versionToFilePath[version] = filePath; }); return versionToFilePath; |