aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-21 07:15:04 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-21 07:15:04 +0800
commit6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8 (patch)
tree7b6a6eb86d6a0463221a502fb886bae6ff5a243c /packages/website
parent938aabde3db0044c658e86765e1bbdbdce4e4a17 (diff)
parente54501522dcf93521c8ff7dfe5b216cffeaa1b29 (diff)
downloaddexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar
dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.gz
dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.bz2
dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.lz
dexon-sol-tools-6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8.tar.xz
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')
-rw-r--r--packages/website/md/docs/0xjs/1.0.0/async.md (renamed from packages/website/md/docs/0xjs/async.md)0
-rw-r--r--packages/website/md/docs/0xjs/1.0.0/errors.md (renamed from packages/website/md/docs/0xjs/errors.md)0
-rw-r--r--packages/website/md/docs/0xjs/1.0.0/installation.md (renamed from packages/website/md/docs/0xjs/installation.md)0
-rw-r--r--packages/website/md/docs/0xjs/1.0.0/introduction.md (renamed from packages/website/md/docs/0xjs/introduction.md)0
-rw-r--r--packages/website/md/docs/0xjs/1.0.0/versioning.md (renamed from packages/website/md/docs/0xjs/versioning.md)0
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/introduction.md3
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/versioning.md1
-rw-r--r--packages/website/md/docs/connect/1.0.0/installation.md (renamed from packages/website/md/docs/connect/installation.md)0
-rw-r--r--packages/website/md/docs/connect/1.0.0/introduction.md (renamed from packages/website/md/docs/connect/introduction.md)0
-rw-r--r--packages/website/md/docs/json_schemas/1.0.0/installation.md (renamed from packages/website/md/docs/json_schemas/installation.md)0
-rw-r--r--packages/website/md/docs/json_schemas/1.0.0/introduction.md (renamed from packages/website/md/docs/json_schemas/introduction.md)2
-rw-r--r--packages/website/md/docs/json_schemas/1.0.0/schemas.md (renamed from packages/website/md/docs/json_schemas/schemas.md)0
-rw-r--r--packages/website/md/docs/json_schemas/1.0.0/usage.md (renamed from packages/website/md/docs/json_schemas/usage.md)0
-rw-r--r--packages/website/md/docs/order_utils/1.0.0/installation.md (renamed from packages/website/md/docs/order_utils/installation.md)0
-rw-r--r--packages/website/md/docs/order_utils/1.0.0/introduction.md (renamed from packages/website/md/docs/order_utils/introduction.md)0
-rw-r--r--packages/website/md/docs/smart_contracts/1.0.0/introduction.md (renamed from packages/website/md/docs/smart_contracts/introduction.md)0
-rw-r--r--packages/website/md/docs/sol_cov/usage.md4
-rw-r--r--packages/website/package.json10
-rw-r--r--packages/website/ts/containers/connect_documentation.ts12
-rw-r--r--packages/website/ts/containers/ethereum_types_documentation.ts8
-rw-r--r--packages/website/ts/containers/json_schemas_documentation.ts20
-rw-r--r--packages/website/ts/containers/order_utils_documentation.ts12
-rw-r--r--packages/website/ts/containers/smart_contracts_documentation.ts8
-rw-r--r--packages/website/ts/containers/sol_compiler_documentation.ts14
-rw-r--r--packages/website/ts/containers/sol_cov_documentation.ts14
-rw-r--r--packages/website/ts/containers/subproviders_documentation.ts14
-rw-r--r--packages/website/ts/containers/web3_wrapper_documentation.ts12
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts35
-rw-r--r--packages/website/ts/utils/doc_utils.ts3
29 files changed, 104 insertions, 68 deletions
diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/1.0.0/async.md
index 8abaef331..8abaef331 100644
--- a/packages/website/md/docs/0xjs/async.md
+++ b/packages/website/md/docs/0xjs/1.0.0/async.md
diff --git a/packages/website/md/docs/0xjs/errors.md b/packages/website/md/docs/0xjs/1.0.0/errors.md
index e97973ccf..e97973ccf 100644
--- a/packages/website/md/docs/0xjs/errors.md
+++ b/packages/website/md/docs/0xjs/1.0.0/errors.md
diff --git a/packages/website/md/docs/0xjs/installation.md b/packages/website/md/docs/0xjs/1.0.0/installation.md
index ac0a47699..ac0a47699 100644
--- a/packages/website/md/docs/0xjs/installation.md
+++ b/packages/website/md/docs/0xjs/1.0.0/installation.md
diff --git a/packages/website/md/docs/0xjs/introduction.md b/packages/website/md/docs/0xjs/1.0.0/introduction.md
index 008376d33..008376d33 100644
--- a/packages/website/md/docs/0xjs/introduction.md
+++ b/packages/website/md/docs/0xjs/1.0.0/introduction.md
diff --git a/packages/website/md/docs/0xjs/versioning.md b/packages/website/md/docs/0xjs/1.0.0/versioning.md
index 6bcaa5b4d..6bcaa5b4d 100644
--- a/packages/website/md/docs/0xjs/versioning.md
+++ b/packages/website/md/docs/0xjs/1.0.0/versioning.md
diff --git a/packages/website/md/docs/0xjs/2.0.0/introduction.md b/packages/website/md/docs/0xjs/2.0.0/introduction.md
new file mode 100644
index 000000000..b98aeef38
--- /dev/null
+++ b/packages/website/md/docs/0xjs/2.0.0/introduction.md
@@ -0,0 +1,3 @@
+<b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b>
+
+Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more.
diff --git a/packages/website/md/docs/0xjs/2.0.0/versioning.md b/packages/website/md/docs/0xjs/2.0.0/versioning.md
new file mode 100644
index 000000000..7f2b6fee9
--- /dev/null
+++ b/packages/website/md/docs/0xjs/2.0.0/versioning.md
@@ -0,0 +1 @@
+Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes.
diff --git a/packages/website/md/docs/connect/installation.md b/packages/website/md/docs/connect/1.0.0/installation.md
index 950bf92ca..950bf92ca 100644
--- a/packages/website/md/docs/connect/installation.md
+++ b/packages/website/md/docs/connect/1.0.0/installation.md
diff --git a/packages/website/md/docs/connect/introduction.md b/packages/website/md/docs/connect/1.0.0/introduction.md
index 4e3039442..4e3039442 100644
--- a/packages/website/md/docs/connect/introduction.md
+++ b/packages/website/md/docs/connect/1.0.0/introduction.md
diff --git a/packages/website/md/docs/json_schemas/installation.md b/packages/website/md/docs/json_schemas/1.0.0/installation.md
index 50a37bae1..50a37bae1 100644
--- a/packages/website/md/docs/json_schemas/installation.md
+++ b/packages/website/md/docs/json_schemas/1.0.0/installation.md
diff --git a/packages/website/md/docs/json_schemas/introduction.md b/packages/website/md/docs/json_schemas/1.0.0/introduction.md
index a27f4b521..cc777b1a8 100644
--- a/packages/website/md/docs/json_schemas/introduction.md
+++ b/packages/website/md/docs/json_schemas/1.0.0/introduction.md
@@ -1,3 +1,5 @@
+<b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b>
+
Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project.
If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...).
diff --git a/packages/website/md/docs/json_schemas/schemas.md b/packages/website/md/docs/json_schemas/1.0.0/schemas.md
index fcf5d8df6..fcf5d8df6 100644
--- a/packages/website/md/docs/json_schemas/schemas.md
+++ b/packages/website/md/docs/json_schemas/1.0.0/schemas.md
diff --git a/packages/website/md/docs/json_schemas/usage.md b/packages/website/md/docs/json_schemas/1.0.0/usage.md
index 68b801153..68b801153 100644
--- a/packages/website/md/docs/json_schemas/usage.md
+++ b/packages/website/md/docs/json_schemas/1.0.0/usage.md
diff --git a/packages/website/md/docs/order_utils/installation.md b/packages/website/md/docs/order_utils/1.0.0/installation.md
index 68a7cf960..68a7cf960 100644
--- a/packages/website/md/docs/order_utils/installation.md
+++ b/packages/website/md/docs/order_utils/1.0.0/installation.md
diff --git a/packages/website/md/docs/order_utils/introduction.md b/packages/website/md/docs/order_utils/1.0.0/introduction.md
index d5f3f2925..d5f3f2925 100644
--- a/packages/website/md/docs/order_utils/introduction.md
+++ b/packages/website/md/docs/order_utils/1.0.0/introduction.md
diff --git a/packages/website/md/docs/smart_contracts/introduction.md b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md
index 566a573b6..566a573b6 100644
--- a/packages/website/md/docs/smart_contracts/introduction.md
+++ b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md
diff --git a/packages/website/md/docs/sol_cov/usage.md b/packages/website/md/docs/sol_cov/usage.md
index 433cfad96..c747005fb 100644
--- a/packages/website/md/docs/sol_cov/usage.md
+++ b/packages/website/md/docs/sol_cov/usage.md
@@ -8,7 +8,7 @@ In order to use `CoverageSubprovider` with your favorite framework you need to p
### Sol-compiler
-If you are generating your artifacts with [@0xproject/sol-compiler](LINK) you can use the `SolCompilerArtifactsAdapter` we've implemented for you.
+If you are generating your artifacts with [@0xproject/sol-compiler](https://0xproject.com/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you.
```typescript
import { SolCompilerArtifactsAdapter } from '@0xproject/sol-cov';
@@ -19,7 +19,7 @@ const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contract
### Truffle
-If your project is using [Truffle](LINK), we've written a `TruffleArtifactsAdapter`for you.
+If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you.
```typescript
import { TruffleArtifactAdapter } from '@0xproject/sol-cov';
diff --git a/packages/website/package.json b/packages/website/package.json
index 4cefa19a9..99fd7cff3 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -7,7 +7,7 @@
"private": true,
"description": "Website and 0x portal dapp",
"scripts": {
- "build": "NODE_ENV=production webpack; exit 0;",
+ "build": "NODE_ENV=production node --max_old_space_size=8192 ../../node_modules/.bin/webpack; exit 0;",
"clean": "shx rm -f public/bundle*",
"lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
"watch_without_deps": "webpack-dev-server --content-base public --https",
@@ -23,13 +23,13 @@
"dependencies": {
"@0xproject/contract-wrappers": "^0.0.5",
"@0xproject/order-utils": "^0.0.9",
- "@0xproject/react-docs": "^0.0.16",
+ "@0xproject/react-docs": "^1.0.0",
"@0xproject/react-shared": "^0.2.3",
- "@0xproject/subproviders": "^0.10.6",
+ "@0xproject/subproviders": "^1.0.0",
"@0xproject/types": "^0.8.1",
"@0xproject/typescript-typings": "^0.4.3",
- "@0xproject/utils": "^0.7.3",
- "@0xproject/web3-wrapper": "^0.7.3",
+ "@0xproject/utils": "^1.0.0",
+ "@0xproject/web3-wrapper": "^1.0.0",
"accounting": "^0.4.1",
"basscss": "^8.0.3",
"blockies": "^0.0.2",
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;