aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-20 02:45:20 +0800
committerFabio Berger <me@fabioberger.com>2018-07-20 02:45:20 +0800
commite53e2ac31befb850045430ff610e1cee7c446de7 (patch)
tree2479b5b8b5f218829fe690d4c65b2142f222e638 /packages/website/ts
parentb72857cd8b8a391b340d2f09636b140bcfd73a31 (diff)
downloaddexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar.gz
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar.bz2
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar.lz
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar.xz
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.tar.zst
dexon-0x-contracts-e53e2ac31befb850045430ff610e1cee7c446de7.zip
Fix version dropdown so it also renders RC versions properly
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/utils/doc_utils.ts3
1 files changed, 1 insertions, 2 deletions
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;