aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/types.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-29 01:16:35 +0800
committerFabio Berger <me@fabioberger.com>2017-11-29 01:16:35 +0800
commit3472bdcfd4ea0a6145dd68972f563e483baf7e6b (patch)
tree6ed8d25cd58cd243aaf94af37f4e9d1d6a98fc85 /packages/website/ts/types.ts
parent78f0ab36823127b67c1ea24b7245c51ba814b16a (diff)
downloaddexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar.gz
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar.bz2
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar.lz
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar.xz
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.tar.zst
dexon-0x-contracts-3472bdcfd4ea0a6145dd68972f563e483baf7e6b.zip
Refactor docs to be more declarative, put all hard-coded doc-related data in one place so it easier to add new doc pages
Diffstat (limited to 'packages/website/ts/types.ts')
-rw-r--r--packages/website/ts/types.ts52
1 files changed, 24 insertions, 28 deletions
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 403af9e78..c20b09cd5 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -468,33 +468,6 @@ export interface CustomTypeChild {
defaultValue?: string;
}
-export const ZeroExJsDocSections = strEnum([
- 'introduction',
- 'installation',
- 'testrpc',
- 'async',
- 'errors',
- 'versioning',
- 'zeroEx',
- 'exchange',
- 'token',
- 'tokenRegistry',
- 'etherToken',
- 'proxy',
- 'types',
-]);
-export type ZeroExJsDocSections = keyof typeof ZeroExJsDocSections;
-
-export const SmartContractsDocSections = strEnum([
- 'Introduction',
- 'Exchange',
- 'TokenTransferProxy',
- 'TokenRegistry',
- 'ZRXToken',
- 'EtherToken',
-]);
-export type SmartContractsDocSections = keyof typeof SmartContractsDocSections;
-
export interface FAQQuestion {
prompt: string;
answer: React.ReactNode;
@@ -689,4 +662,27 @@ export enum WebsitePaths {
About = '/about',
Whitepaper = '/pdfs/0x_white_paper.pdf',
SmartContracts = '/docs/contracts',
-} // tslint:disable:max-file-line-count
+}
+
+export interface DocsMenu {
+ [sectionName: string]: string[];
+}
+
+export interface SectionsMap {
+ [sectionName: string]: string;
+}
+
+export interface DocsInfoConfig {
+ packageName: string;
+ packageUrl: string;
+ websitePath: string;
+ docsJsonRoot: string;
+ menu: DocsMenu;
+ sections: SectionsMap;
+ sectionNameToMarkdown: {[sectionName: string]: string};
+ publicTypes?: string[];
+ sectionNameToModulePath?: {[sectionName: string]: string[]};
+ menuSubsectionToVersionWhenIntroduced?: {[sectionName: string]: string};
+}
+
+// tslint:disable:max-file-line-count