From 72a00ac2df47ff793d74c2a82c7f403f501e784a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Nov 2017 15:11:04 -0600 Subject: Refactor the topLevel documentation react components for 0x.js and Smart contracts into a single component --- packages/website/ts/utils/constants.ts | 1 - packages/website/ts/utils/typedoc_utils.ts | 27 +-------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) (limited to 'packages/website/ts/utils') diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index f307df929..cae59af5f 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -33,7 +33,6 @@ export const constants = { FEE_RECIPIENT_ADDRESS: '0x0000000000000000000000000000000000000000', FIREFOX_U2F_ADDON: 'https://addons.mozilla.org/en-US/firefox/addon/u2f-support-add-on/', GITHUB_URL: 'https://github.com/0xProject', - GITHUB_CONTRACTS_URL: 'https://github.com/0xProject/contracts', GITHUB_WIKI_URL: 'https://github.com/0xProject/wiki', HTTP_NO_CONTENT_STATUS_CODE: 204, ACCEPT_DISCLAIMER_LOCAL_STORAGE_KEY: 'didAcceptPortalDisclaimer', diff --git a/packages/website/ts/utils/typedoc_utils.ts b/packages/website/ts/utils/typedoc_utils.ts index 61d9f4bf2..7708efb35 100644 --- a/packages/website/ts/utils/typedoc_utils.ts +++ b/packages/website/ts/utils/typedoc_utils.ts @@ -53,32 +53,7 @@ export const typeDocUtils = { } return undefined; }, - getMenuSubsectionsBySection( - sections: SectionsMap, docAgnosticFormat?: DocAgnosticFormat, - ): MenuSubsectionsBySection { - const menuSubsectionsBySection = {} as MenuSubsectionsBySection; - if (_.isUndefined(docAgnosticFormat)) { - return menuSubsectionsBySection; - } - - const docSections = _.keys(sections); - _.each(docSections, sectionName => { - const docSection = docAgnosticFormat[sectionName]; - if (_.isUndefined(docSection)) { - return; // no-op - } - - if (!_.isUndefined(sections.types) && sectionName === sections.types) { - const typeNames = _.map(docSection.types, t => t.name); - menuSubsectionsBySection[sectionName] = typeNames; - } else { - const methodNames = _.map(docSection.methods, m => m.name); - menuSubsectionsBySection[sectionName] = methodNames; - } - }); - return menuSubsectionsBySection; - }, - convertToDocAgnosticFormat(docsInfo: DocsInfo, typeDocJson: TypeDocNode): DocAgnosticFormat { + convertToDocAgnosticFormat(typeDocJson: TypeDocNode, docsInfo: DocsInfo): DocAgnosticFormat { const subMenus = _.values(docsInfo.getMenu()); const orderedSectionNames = _.flatten(subMenus); const docAgnosticFormat: DocAgnosticFormat = {}; -- cgit v1.2.3