diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-03 03:09:38 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-03 03:09:38 +0800 |
commit | c7a5b8c776afd343d2a3484cb249120a3d0a5085 (patch) | |
tree | 0126750efc4d69e635bbed459f25b19dbec86ce8 | |
parent | 90ead59d34bf5218cf4e1e5317a4ffeb497da8e1 (diff) | |
download | dexon-0x-contracts-c7a5b8c776afd343d2a3484cb249120a3d0a5085.tar.gz dexon-0x-contracts-c7a5b8c776afd343d2a3484cb249120a3d0a5085.tar.zst dexon-0x-contracts-c7a5b8c776afd343d2a3484cb249120a3d0a5085.zip |
Add MD sections to contract-wrappers docs
3 files changed, 33 insertions, 4 deletions
diff --git a/packages/website/md/docs/contract_wrappers/installation.md b/packages/website/md/docs/contract_wrappers/installation.md new file mode 100644 index 000000000..d5c7fbdba --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/installation.md @@ -0,0 +1,11 @@ +**Install** + +```bash +npm install @0xproject/contract-wrappers --save +``` + +**Import** + +```javascript +import { ContractWrappers } from '@0xproject/contract-wrappers'; +``` diff --git a/packages/website/md/docs/contract_wrappers/introduction.md b/packages/website/md/docs/contract_wrappers/introduction.md new file mode 100644 index 000000000..74254bdad --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/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 [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index f0547cecd..67d19bb2a 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -9,16 +9,31 @@ import { DocPackages } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -// TODO: Add MD sections -const markdownSections = {}; +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/contract_wrappers/introduction'); +const InstallMarkdown = require('md/docs/contract_wrappers/installation'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', +}; const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ContractWrappers, type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', - markdownMenu: {}, - sectionNameToMarkdownByVersion: {}, + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + }, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallMarkdown, + }, + }, markdownSections, typeConfigs: { typeNameToPrefix: {}, |