aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts11
-rw-r--r--packages/website/ts/utils/doc_utils.ts3
-rw-r--r--packages/website/ts/utils/utils.ts2
3 files changed, 13 insertions, 3 deletions
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts
index 2fc08e923..6be54595d 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.ts
+++ b/packages/website/ts/containers/zero_ex_js_documentation.ts
@@ -15,6 +15,9 @@ 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 = {
@@ -62,6 +65,14 @@ const docsInfoConfig: DocsInfoConfig = {
[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;
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index e656d5963..439af5e4b 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -334,7 +334,7 @@ export const utils = {
return utils.isDogfood() ? configs.BACKEND_BASE_STAGING_URL : configs.BACKEND_BASE_PROD_URL;
},
isDevelopment(): boolean {
- return _.includes(configs.DOMAINS_DEVELOPMENT, window.location.origin);
+ return _.includes(configs.DOMAINS_DEVELOPMENT, window.location.host);
},
isStaging(): boolean {
return _.includes(window.location.href, configs.DOMAIN_STAGING);