From 324b1079e7eb29829bf06ff65299acdc58abf308 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 9 Jul 2018 19:05:38 +0200 Subject: Add ability to nest doc ref markdown under specific versions --- packages/website/md/docs/0xjs/1.0.0/async.md | 26 ++++++++++++++++++ packages/website/md/docs/0xjs/1.0.0/errors.md | 1 + .../website/md/docs/0xjs/1.0.0/installation.md | 31 ++++++++++++++++++++++ .../website/md/docs/0xjs/1.0.0/introduction.md | 1 + packages/website/md/docs/0xjs/1.0.0/versioning.md | 1 + packages/website/md/docs/0xjs/async.md | 26 ------------------ packages/website/md/docs/0xjs/errors.md | 1 - packages/website/md/docs/0xjs/installation.md | 31 ---------------------- packages/website/md/docs/0xjs/introduction.md | 1 - packages/website/md/docs/0xjs/versioning.md | 1 - .../website/md/docs/connect/1.0.0/installation.md | 15 +++++++++++ .../website/md/docs/connect/1.0.0/introduction.md | 1 + packages/website/md/docs/connect/installation.md | 15 ----------- packages/website/md/docs/connect/introduction.md | 1 - .../md/docs/json_schemas/1.0.0/installation.md | 17 ++++++++++++ .../md/docs/json_schemas/1.0.0/introduction.md | 3 +++ .../website/md/docs/json_schemas/1.0.0/schemas.md | 28 +++++++++++++++++++ .../website/md/docs/json_schemas/1.0.0/usage.md | 14 ++++++++++ .../website/md/docs/json_schemas/installation.md | 17 ------------ .../website/md/docs/json_schemas/introduction.md | 3 --- packages/website/md/docs/json_schemas/schemas.md | 28 ------------------- packages/website/md/docs/json_schemas/usage.md | 14 ---------- .../md/docs/order_utils/1.0.0/installation.md | 17 ++++++++++++ .../md/docs/order_utils/1.0.0/introduction.md | 1 + .../website/md/docs/order_utils/installation.md | 17 ------------ .../website/md/docs/order_utils/introduction.md | 1 - .../md/docs/smart_contracts/1.0.0/introduction.md | 8 ++++++ .../md/docs/smart_contracts/introduction.md | 8 ------ .../website/ts/containers/connect_documentation.ts | 12 +++++---- .../ts/containers/ethereum_types_documentation.ts | 8 +++--- .../ts/containers/json_schemas_documentation.ts | 20 +++++++------- .../ts/containers/order_utils_documentation.ts | 12 +++++---- .../ts/containers/smart_contracts_documentation.ts | 8 +++--- .../ts/containers/sol_compiler_documentation.ts | 14 +++++----- .../website/ts/containers/sol_cov_documentation.ts | 14 +++++----- .../ts/containers/subproviders_documentation.ts | 14 +++++----- .../ts/containers/web3_wrapper_documentation.ts | 12 +++++---- .../ts/containers/zero_ex_js_documentation.ts | 24 +++++++++-------- 38 files changed, 243 insertions(+), 223 deletions(-) create mode 100644 packages/website/md/docs/0xjs/1.0.0/async.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/errors.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/installation.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/introduction.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/versioning.md delete mode 100644 packages/website/md/docs/0xjs/async.md delete mode 100644 packages/website/md/docs/0xjs/errors.md delete mode 100644 packages/website/md/docs/0xjs/installation.md delete mode 100644 packages/website/md/docs/0xjs/introduction.md delete mode 100644 packages/website/md/docs/0xjs/versioning.md create mode 100644 packages/website/md/docs/connect/1.0.0/installation.md create mode 100644 packages/website/md/docs/connect/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/connect/installation.md delete mode 100644 packages/website/md/docs/connect/introduction.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/installation.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/introduction.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/schemas.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/usage.md delete mode 100644 packages/website/md/docs/json_schemas/installation.md delete mode 100644 packages/website/md/docs/json_schemas/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/usage.md create mode 100644 packages/website/md/docs/order_utils/1.0.0/installation.md create mode 100644 packages/website/md/docs/order_utils/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/order_utils/installation.md delete mode 100644 packages/website/md/docs/order_utils/introduction.md create mode 100644 packages/website/md/docs/smart_contracts/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/introduction.md (limited to 'packages/website') diff --git a/packages/website/md/docs/0xjs/1.0.0/async.md b/packages/website/md/docs/0xjs/1.0.0/async.md new file mode 100644 index 000000000..8abaef331 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/async.md @@ -0,0 +1,26 @@ +0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. + +_Async/await syntax (recommended):_ + +```javascript +try { + var availableAddresses = await zeroEx.getAvailableAddressesAsync(); +} catch (error) { + console.log('Caught error: ', error); +} +``` + +_Promise syntax:_ + +```javascript +zeroEx + .getAvailableAddressesAsync() + .then(function(availableAddresses) { + console.log(availableAddresses); + }) + .catch(function(error) { + console.log('Caught error: ', error); + }); +``` + +As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/1.0.0/errors.md b/packages/website/md/docs/0xjs/1.0.0/errors.md new file mode 100644 index 000000000..e97973ccf --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/errors.md @@ -0,0 +1 @@ +All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section. diff --git a/packages/website/md/docs/0xjs/1.0.0/installation.md b/packages/website/md/docs/0xjs/1.0.0/installation.md new file mode 100644 index 000000000..ac0a47699 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/installation.md @@ -0,0 +1,31 @@ +0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. + +#### CommonJS _(recommended)_: + +**Install** + +```bash +npm install 0x.js --save +``` + +**Import** + +```javascript +import { ZeroEx } from '0x.js'; +``` + +#### UMD: + +**Install** + +Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. + +**Import** + +```html + +``` + +### Wiki + +Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/0xjs/1.0.0/introduction.md b/packages/website/md/docs/0xjs/1.0.0/introduction.md new file mode 100644 index 000000000..008376d33 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/1.0.0/versioning.md b/packages/website/md/docs/0xjs/1.0.0/versioning.md new file mode 100644 index 000000000..6bcaa5b4d --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/versioning.md @@ -0,0 +1 @@ +This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app. diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/async.md deleted file mode 100644 index 8abaef331..000000000 --- a/packages/website/md/docs/0xjs/async.md +++ /dev/null @@ -1,26 +0,0 @@ -0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. - -_Async/await syntax (recommended):_ - -```javascript -try { - var availableAddresses = await zeroEx.getAvailableAddressesAsync(); -} catch (error) { - console.log('Caught error: ', error); -} -``` - -_Promise syntax:_ - -```javascript -zeroEx - .getAvailableAddressesAsync() - .then(function(availableAddresses) { - console.log(availableAddresses); - }) - .catch(function(error) { - console.log('Caught error: ', error); - }); -``` - -As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/errors.md b/packages/website/md/docs/0xjs/errors.md deleted file mode 100644 index e97973ccf..000000000 --- a/packages/website/md/docs/0xjs/errors.md +++ /dev/null @@ -1 +0,0 @@ -All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section. diff --git a/packages/website/md/docs/0xjs/installation.md b/packages/website/md/docs/0xjs/installation.md deleted file mode 100644 index ac0a47699..000000000 --- a/packages/website/md/docs/0xjs/installation.md +++ /dev/null @@ -1,31 +0,0 @@ -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { ZeroEx } from '0x.js'; -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html - -``` - -### Wiki - -Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/0xjs/introduction.md b/packages/website/md/docs/0xjs/introduction.md deleted file mode 100644 index 008376d33..000000000 --- a/packages/website/md/docs/0xjs/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/versioning.md b/packages/website/md/docs/0xjs/versioning.md deleted file mode 100644 index 6bcaa5b4d..000000000 --- a/packages/website/md/docs/0xjs/versioning.md +++ /dev/null @@ -1 +0,0 @@ -This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app. diff --git a/packages/website/md/docs/connect/1.0.0/installation.md b/packages/website/md/docs/connect/1.0.0/installation.md new file mode 100644 index 000000000..950bf92ca --- /dev/null +++ b/packages/website/md/docs/connect/1.0.0/installation.md @@ -0,0 +1,15 @@ +**Install** + +```bash +npm install @0xproject/connect --save +``` + +**Import** + +```javascript +import { HttpClient } from '@0xproject/connect'; +``` + +### Wiki + +Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/1.0.0/introduction.md b/packages/website/md/docs/connect/1.0.0/introduction.md new file mode 100644 index 000000000..4e3039442 --- /dev/null +++ b/packages/website/md/docs/connect/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/installation.md b/packages/website/md/docs/connect/installation.md deleted file mode 100644 index 950bf92ca..000000000 --- a/packages/website/md/docs/connect/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -**Install** - -```bash -npm install @0xproject/connect --save -``` - -**Import** - -```javascript -import { HttpClient } from '@0xproject/connect'; -``` - -### Wiki - -Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/introduction.md b/packages/website/md/docs/connect/introduction.md deleted file mode 100644 index 4e3039442..000000000 --- a/packages/website/md/docs/connect/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/json_schemas/1.0.0/installation.md b/packages/website/md/docs/json_schemas/1.0.0/installation.md new file mode 100644 index 000000000..50a37bae1 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/json-schemas +``` + +**Import** + +```javascript +import { schemas } from '@0xproject/json-schemas'; +``` + +or + +```javascript +var schemas = require('@0xproject/json-schemas').schemas; +``` diff --git a/packages/website/md/docs/json_schemas/1.0.0/introduction.md b/packages/website/md/docs/json_schemas/1.0.0/introduction.md new file mode 100644 index 000000000..a27f4b521 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/introduction.md @@ -0,0 +1,3 @@ +Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. + +If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/1.0.0/schemas.md b/packages/website/md/docs/json_schemas/1.0.0/schemas.md new file mode 100644 index 000000000..fcf5d8df6 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/schemas.md @@ -0,0 +1,28 @@ +0x Protocol Schemas + +* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) +* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) +* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) +* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) + +0x.js Schemas + +* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) +* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) +* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) +* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) +* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) +* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) +* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) +* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) + +Standard Relayer API Schemas + +* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) +* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) +* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) +* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) +* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) +* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) +* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) +* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/1.0.0/usage.md b/packages/website/md/docs/json_schemas/1.0.0/usage.md new file mode 100644 index 000000000..68b801153 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/usage.md @@ -0,0 +1,14 @@ +The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. + +```javascript +import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; + +const {orderSchema} = schemas; +const validator = new SchemaValidator(); + +const order = { + ... +}; +const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors +const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean +``` diff --git a/packages/website/md/docs/json_schemas/installation.md b/packages/website/md/docs/json_schemas/installation.md deleted file mode 100644 index 50a37bae1..000000000 --- a/packages/website/md/docs/json_schemas/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/json-schemas -``` - -**Import** - -```javascript -import { schemas } from '@0xproject/json-schemas'; -``` - -or - -```javascript -var schemas = require('@0xproject/json-schemas').schemas; -``` diff --git a/packages/website/md/docs/json_schemas/introduction.md b/packages/website/md/docs/json_schemas/introduction.md deleted file mode 100644 index a27f4b521..000000000 --- a/packages/website/md/docs/json_schemas/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ -Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. - -If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/schemas.md b/packages/website/md/docs/json_schemas/schemas.md deleted file mode 100644 index fcf5d8df6..000000000 --- a/packages/website/md/docs/json_schemas/schemas.md +++ /dev/null @@ -1,28 +0,0 @@ -0x Protocol Schemas - -* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) -* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) - -0x.js Schemas - -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) -* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) - -Standard Relayer API Schemas - -* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) -* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) -* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) -* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) -* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) -* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) -* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/usage.md b/packages/website/md/docs/json_schemas/usage.md deleted file mode 100644 index 68b801153..000000000 --- a/packages/website/md/docs/json_schemas/usage.md +++ /dev/null @@ -1,14 +0,0 @@ -The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. - -```javascript -import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; - -const {orderSchema} = schemas; -const validator = new SchemaValidator(); - -const order = { - ... -}; -const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors -const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean -``` diff --git a/packages/website/md/docs/order_utils/1.0.0/installation.md b/packages/website/md/docs/order_utils/1.0.0/installation.md new file mode 100644 index 000000000..68a7cf960 --- /dev/null +++ b/packages/website/md/docs/order_utils/1.0.0/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/order-utils +``` + +**Import** + +```javascript +import { createSignedOrderAsync } from '@0xproject/order-utils'; +``` + +or + +```javascript +var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; +``` diff --git a/packages/website/md/docs/order_utils/1.0.0/introduction.md b/packages/website/md/docs/order_utils/1.0.0/introduction.md new file mode 100644 index 000000000..d5f3f2925 --- /dev/null +++ b/packages/website/md/docs/order_utils/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_utils/installation.md b/packages/website/md/docs/order_utils/installation.md deleted file mode 100644 index 68a7cf960..000000000 --- a/packages/website/md/docs/order_utils/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-utils -``` - -**Import** - -```javascript -import { createSignedOrderAsync } from '@0xproject/order-utils'; -``` - -or - -```javascript -var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; -``` diff --git a/packages/website/md/docs/order_utils/introduction.md b/packages/website/md/docs/order_utils/introduction.md deleted file mode 100644 index d5f3f2925..000000000 --- a/packages/website/md/docs/order_utils/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/smart_contracts/1.0.0/introduction.md b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md new file mode 100644 index 000000000..566a573b6 --- /dev/null +++ b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md @@ -0,0 +1,8 @@ +Welcome to the [0x smart contracts](https://github.com/0xProject/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. + +### Helpful wiki articles: + +* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) +* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) +* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) +* [0x protocol message format](https://0xproject.com/wiki#Message-Format) diff --git a/packages/website/md/docs/smart_contracts/introduction.md b/packages/website/md/docs/smart_contracts/introduction.md deleted file mode 100644 index 566a573b6..000000000 --- a/packages/website/md/docs/smart_contracts/introduction.md +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. - -### Helpful wiki articles: - -* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) -* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) -* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) -* [0x protocol message format](https://0xproject.com/wiki#Message-Format) diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index f939ef0df..abf419347 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/connect/introduction'); -const InstallationMarkdown = require('md/docs/connect/installation'); +const IntroMarkdownV1 = require('md/docs/connect/1.0.0/introduction'); +const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation'); /* tslint:enable:no-var-requires */ const connectDocSections = { @@ -34,9 +34,11 @@ const docsInfoConfig: DocsInfoConfig = { webSocketOrderbookChannel: [connectDocSections.webSocketOrderbookChannel], types: [connectDocSections.types], }, - sectionNameToMarkdown: { - [connectDocSections.introduction]: IntroMarkdown, - [connectDocSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [connectDocSections.introduction]: IntroMarkdownV1, + [connectDocSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [connectDocSections.httpClient]: ['"src/http_client"'], diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 285438835..0be8dd3bc 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -30,9 +30,11 @@ const docsInfoConfig: DocsInfoConfig = { install: [docSections.installation], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdown, + [docSections.installation]: InstallationMarkdown, + }, }, sectionNameToModulePath: { [docSections.types]: ['"index"'], diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 67740d4c6..523777114 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -9,10 +9,10 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/json_schemas/introduction'); -const InstallationMarkdown = require('md/docs/json_schemas/installation'); -const UsageMarkdown = require('md/docs/json_schemas/usage'); -const SchemasMarkdown = require('md/docs/json_schemas/schemas'); +const IntroMarkdownV1 = require('md/docs/json_schemas/1.0.0/introduction'); +const InstallationMarkdownV1 = require('md/docs/json_schemas/1.0.0/installation'); +const UsageMarkdownV1 = require('md/docs/json_schemas/1.0.0/usage'); +const SchemasMarkdownV1 = require('md/docs/json_schemas/1.0.0/schemas'); /* tslint:enable:no-var-requires */ const docSections = { @@ -35,11 +35,13 @@ const docsInfoConfig: DocsInfoConfig = { schemaValidator: [docSections.schemaValidator], schemas: [docSections.schemas], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.schemas]: SchemasMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.schemas]: SchemasMarkdownV1, + [docSections.usage]: UsageMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.schemaValidator]: ['"json-schemas/src/schema_validator"'], diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 37b7f2273..c6570f514 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/order_utils/introduction'); -const InstallationMarkdown = require('md/docs/order_utils/installation'); +const IntroMarkdownV1 = require('md/docs/order_utils/1.0.0/introduction'); +const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation'); /* tslint:enable:no-var-requires */ const docSections = { @@ -32,9 +32,11 @@ const docsInfoConfig: DocsInfoConfig = { usage: [docSections.usage], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.usage]: [ diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index c88c3b365..b0a712477 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -10,7 +10,7 @@ import { DocPackages, SmartContractDocSections as Sections } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/smart_contracts/introduction'); +const IntroMarkdownV1 = require('md/docs/smart_contracts/1.0.0/introduction'); /* tslint:enable:no-var-requires */ const docsInfoConfig: DocsInfoConfig = { @@ -22,8 +22,10 @@ const docsInfoConfig: DocsInfoConfig = { introduction: [Sections.Introduction], contracts: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy], }, - sectionNameToMarkdown: { - [Sections.Introduction]: IntroMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [Sections.Introduction]: IntroMarkdownV1, + }, }, sections: { Introduction: Sections.Introduction, diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 8720e2c1d..b289c8f34 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -9,8 +9,8 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/sol-compiler/introduction'); -const InstallationMarkdown = require('md/docs/sol-compiler/installation'); +const IntroMarkdownV1 = require('md/docs/sol-compiler/introduction'); +const InstallationMarkdownV1 = require('md/docs/sol-compiler/installation'); const UsageMarkdown = require('md/docs/sol-compiler/usage'); /* tslint:enable:no-var-requires */ @@ -34,10 +34,12 @@ const docsInfoConfig: DocsInfoConfig = { compiler: [docSections.compiler], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.usage]: UsageMarkdown, + }, }, sectionNameToModulePath: { [docSections.compiler]: ['"sol-compiler/src/compiler"'], diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index a8009071f..d78c450ed 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -9,8 +9,8 @@ import { DocPackages } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/sol_cov/introduction'); -const InstallationMarkdown = require('md/docs/sol_cov/installation'); +const IntroMarkdownV1 = require('md/docs/sol_cov/introduction'); +const InstallationMarkdownV1 = require('md/docs/sol_cov/installation'); const UsageMarkdown = require('md/docs/sol_cov/usage'); /* tslint:enable:no-var-requires */ @@ -40,10 +40,12 @@ const docsInfoConfig: DocsInfoConfig = { 'truffle-artifact-adapter': [docSections.truffleArtifactAdapter], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.usage]: UsageMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.usage]: UsageMarkdown, + }, }, sectionNameToModulePath: { [docSections.coverageSubprovider]: ['"sol-cov/src/coverage_subprovider"'], diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 567f6a37e..0e9150d7b 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/subproviders/introduction'); -const InstallationMarkdown = require('md/docs/subproviders/installation'); +const IntroMarkdownV1 = require('md/docs/subproviders/introduction'); +const InstallationMarkdownV1 = require('md/docs/subproviders/installation'); const LedgerNodeHidMarkdown = require('md/docs/subproviders/ledger_node_hid'); /* tslint:enable:no-var-requires */ @@ -57,10 +57,12 @@ const docsInfoConfig: DocsInfoConfig = { ['nonceTracker-subprovider']: [docSections.nonceTrackerSubprovider], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, - [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, + }, }, sectionNameToModulePath: { [docSections.subprovider]: ['"subproviders/src/subproviders/subprovider"'], diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index b04a83ac4..8d98d9476 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -10,8 +10,8 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/web3_wrapper/introduction'); -const InstallationMarkdown = require('md/docs/web3_wrapper/installation'); +const IntroMarkdownV1 = require('md/docs/web3_wrapper/introduction'); +const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation'); /* tslint:enable:no-var-requires */ const docSections = { @@ -32,9 +32,11 @@ const docsInfoConfig: DocsInfoConfig = { web3Wrapper: [docSections.web3Wrapper], types: [docSections.types], }, - sectionNameToMarkdown: { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [docSections.introduction]: IntroMarkdownV1, + [docSections.installation]: InstallationMarkdownV1, + }, }, sectionNameToModulePath: { [docSections.web3Wrapper]: ['"web3-wrapper/src/web3_wrapper"'], diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index bd0d1732a..b43a1f645 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -10,11 +10,11 @@ import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/0xjs/introduction'); -const InstallationMarkdown = require('md/docs/0xjs/installation'); -const AsyncMarkdown = require('md/docs/0xjs/async'); -const ErrorsMarkdown = require('md/docs/0xjs/errors'); -const versioningMarkdown = require('md/docs/0xjs/versioning'); +const IntroMarkdownV1 = require('md/docs/0xjs/1.0.0/introduction'); +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'); /* tslint:enable:no-var-requires */ const zeroExJsDocSections = { @@ -54,12 +54,14 @@ const docsInfoConfig: DocsInfoConfig = { orderWatcher: [zeroExJsDocSections.orderWatcher], types: [zeroExJsDocSections.types], }, - sectionNameToMarkdown: { - [zeroExJsDocSections.introduction]: IntroMarkdown, - [zeroExJsDocSections.installation]: InstallationMarkdown, - [zeroExJsDocSections.async]: AsyncMarkdown, - [zeroExJsDocSections.errors]: ErrorsMarkdown, - [zeroExJsDocSections.versioning]: versioningMarkdown, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [zeroExJsDocSections.introduction]: IntroMarkdownV1, + [zeroExJsDocSections.installation]: InstallationMarkdownV1, + [zeroExJsDocSections.async]: AsyncMarkdownV1, + [zeroExJsDocSections.errors]: ErrorsMarkdownV1, + [zeroExJsDocSections.versioning]: versioningMarkdownV1, + }, }, sectionNameToModulePath: { [zeroExJsDocSections.zeroEx]: ['"0x.js/src/0x"', '"src/0x"'], -- cgit From 55336f96d70d05f07725564bf6aec573dc3246c2 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 18 Jul 2018 15:53:33 -0700 Subject: Fix broken links in sol-cov documentation --- packages/website/md/docs/sol_cov/usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/website') diff --git a/packages/website/md/docs/sol_cov/usage.md b/packages/website/md/docs/sol_cov/usage.md index 433cfad96..c747005fb 100644 --- a/packages/website/md/docs/sol_cov/usage.md +++ b/packages/website/md/docs/sol_cov/usage.md @@ -8,7 +8,7 @@ In order to use `CoverageSubprovider` with your favorite framework you need to p ### Sol-compiler -If you are generating your artifacts with [@0xproject/sol-compiler](LINK) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. +If you are generating your artifacts with [@0xproject/sol-compiler](https://0xproject.com/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. ```typescript import { SolCompilerArtifactsAdapter } from '@0xproject/sol-cov'; @@ -19,7 +19,7 @@ const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contract ### Truffle -If your project is using [Truffle](LINK), we've written a `TruffleArtifactsAdapter`for you. +If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. ```typescript import { TruffleArtifactAdapter } from '@0xproject/sol-cov'; -- cgit From cc223b9eaba4710767227644d2db63298a6b8ecb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 19 Jul 2018 19:01:25 +0200 Subject: Compare host rather then origin so that it comes without the http/https prefix --- packages/website/ts/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') 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); -- cgit From b72857cd8b8a391b340d2f09636b140bcfd73a31 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 19 Jul 2018 20:45:00 +0200 Subject: Update doc md files for v2 packages --- packages/website/md/docs/0xjs/2.0.0/introduction.md | 3 +++ packages/website/md/docs/0xjs/2.0.0/versioning.md | 1 + packages/website/md/docs/json_schemas/1.0.0/introduction.md | 2 ++ packages/website/ts/containers/zero_ex_js_documentation.ts | 11 +++++++++++ 4 files changed, 17 insertions(+) create mode 100644 packages/website/md/docs/0xjs/2.0.0/introduction.md create mode 100644 packages/website/md/docs/0xjs/2.0.0/versioning.md (limited to 'packages/website') diff --git a/packages/website/md/docs/0xjs/2.0.0/introduction.md b/packages/website/md/docs/0xjs/2.0.0/introduction.md new file mode 100644 index 000000000..b98aeef38 --- /dev/null +++ b/packages/website/md/docs/0xjs/2.0.0/introduction.md @@ -0,0 +1,3 @@ +**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version. + +Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/2.0.0/versioning.md b/packages/website/md/docs/0xjs/2.0.0/versioning.md new file mode 100644 index 000000000..5fe66ad9a --- /dev/null +++ b/packages/website/md/docs/0xjs/2.0.0/versioning.md @@ -0,0 +1 @@ +Since v1.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes. diff --git a/packages/website/md/docs/json_schemas/1.0.0/introduction.md b/packages/website/md/docs/json_schemas/1.0.0/introduction.md index a27f4b521..cc777b1a8 100644 --- a/packages/website/md/docs/json_schemas/1.0.0/introduction.md +++ b/packages/website/md/docs/json_schemas/1.0.0/introduction.md @@ -1,3 +1,5 @@ +**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version. + Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). 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"'], -- cgit From e53e2ac31befb850045430ff610e1cee7c446de7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 19 Jul 2018 20:45:20 +0200 Subject: Fix version dropdown so it also renders RC versions properly --- packages/website/ts/utils/doc_utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/website') 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; -- cgit From e5c5b36a73aad7a84e9540d905bc568997d12c5b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 19 Jul 2018 21:05:37 +0200 Subject: Specify exact version --- packages/website/md/docs/0xjs/2.0.0/versioning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/md/docs/0xjs/2.0.0/versioning.md b/packages/website/md/docs/0xjs/2.0.0/versioning.md index 5fe66ad9a..7f2b6fee9 100644 --- a/packages/website/md/docs/0xjs/2.0.0/versioning.md +++ b/packages/website/md/docs/0xjs/2.0.0/versioning.md @@ -1 +1 @@ -Since v1.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes. +Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes. -- cgit From a9fa1a0df678ce7ab38106036868227fd93d8c4d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 21:54:44 +0200 Subject: Change all package to depend on the new @0xproject/typescript-typings@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 4cefa19a9..d253b82f4 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -27,7 +27,7 @@ "@0xproject/react-shared": "^0.2.3", "@0xproject/subproviders": "^0.10.6", "@0xproject/types": "^0.8.1", - "@0xproject/typescript-typings": "^0.4.3", + "@0xproject/typescript-typings": "^1.0.0", "@0xproject/utils": "^0.7.3", "@0xproject/web3-wrapper": "^0.7.3", "accounting": "^0.4.1", -- cgit From 534decea9593da90c99facf808dfd69abed34bd0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 22:17:55 +0200 Subject: Change all package to depend on the new @0xproject/types@1.0.0-rc.1 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index d253b82f4..af7680ce1 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -26,7 +26,7 @@ "@0xproject/react-docs": "^0.0.16", "@0xproject/react-shared": "^0.2.3", "@0xproject/subproviders": "^0.10.6", - "@0xproject/types": "^0.8.1", + "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", "@0xproject/utils": "^0.7.3", "@0xproject/web3-wrapper": "^0.7.3", -- cgit From 37ac6749ba4a537e0a0218fa9d7f6b402515c6ff Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 22:22:51 +0200 Subject: Change all package to depend on the new @0xproject/utils@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index af7680ce1..0b4d6af1f 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -28,7 +28,7 @@ "@0xproject/subproviders": "^0.10.6", "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", - "@0xproject/utils": "^0.7.3", + "@0xproject/utils": "^1.0.0", "@0xproject/web3-wrapper": "^0.7.3", "accounting": "^0.4.1", "basscss": "^8.0.3", -- cgit From 8193fdc3047555e6c56ef31b4dc1af7339477463 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 22:57:27 +0200 Subject: Change all package to depend on the new @0xproject/web3-wrapper@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 0b4d6af1f..d4d95ff69 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -29,7 +29,7 @@ "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", "@0xproject/utils": "^1.0.0", - "@0xproject/web3-wrapper": "^0.7.3", + "@0xproject/web3-wrapper": "^1.0.0", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit From 18b1f016415a851282d4633c317328fd5f3852a3 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 23:12:44 +0200 Subject: Change all package to depend on the new @0xproject/subproviders@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index d4d95ff69..1eabc8120 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -25,7 +25,7 @@ "@0xproject/order-utils": "^0.0.9", "@0xproject/react-docs": "^0.0.16", "@0xproject/react-shared": "^0.2.3", - "@0xproject/subproviders": "^0.10.6", + "@0xproject/subproviders": "^1.0.0", "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", "@0xproject/utils": "^1.0.0", -- cgit From 21effcaa8b0eae74a909c1d0f09fda112457b996 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 23:26:32 +0200 Subject: Change all package to depend on the new @0xproject/order-utils@1.0.0-rc.1 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 1eabc8120..4d2fd5aac 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -22,7 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@0xproject/contract-wrappers": "^0.0.5", - "@0xproject/order-utils": "^0.0.9", + "@0xproject/order-utils": "^1.0.0-rc.1", "@0xproject/react-docs": "^0.0.16", "@0xproject/react-shared": "^0.2.3", "@0xproject/subproviders": "^1.0.0", -- cgit From 6486fced34d062607e2cd7b8db7238256b0de271 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 23:37:01 +0200 Subject: Change all package to depend on the new @0xproject/react-shared@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 4d2fd5aac..ca0b4966f 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -24,7 +24,7 @@ "@0xproject/contract-wrappers": "^0.0.5", "@0xproject/order-utils": "^1.0.0-rc.1", "@0xproject/react-docs": "^0.0.16", - "@0xproject/react-shared": "^0.2.3", + "@0xproject/react-shared": "^1.0.0", "@0xproject/subproviders": "^1.0.0", "@0xproject/types": "^1.0.0-rc.1", "@0xproject/typescript-typings": "^1.0.0", -- cgit From 8bd4e38d021d806c2ff442e3475a30e55655825c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 19 Jul 2018 23:39:28 +0200 Subject: Change all package to depend on the new @0xproject/react-docs@1.0.0 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index ca0b4966f..569ec1fc8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -23,7 +23,7 @@ "dependencies": { "@0xproject/contract-wrappers": "^0.0.5", "@0xproject/order-utils": "^1.0.0-rc.1", - "@0xproject/react-docs": "^0.0.16", + "@0xproject/react-docs": "^1.0.0", "@0xproject/react-shared": "^1.0.0", "@0xproject/subproviders": "^1.0.0", "@0xproject/types": "^1.0.0-rc.1", -- cgit From 0f9c262bb07128539dbfff3b0454b0121ba48c17 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 20 Jul 2018 00:01:24 +0200 Subject: Change all package to depend on the new @0xproject/contract-wrappers@1.0.0-rc.1 --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 569ec1fc8..ae4798041 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -21,7 +21,7 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0xproject/contract-wrappers": "^0.0.5", + "@0xproject/contract-wrappers": "^1.0.0-rc.1", "@0xproject/order-utils": "^1.0.0-rc.1", "@0xproject/react-docs": "^1.0.0", "@0xproject/react-shared": "^1.0.0", -- cgit From 71e386d5fa30f6bc74088039c25e79fcb8ee1f33 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 20 Jul 2018 01:22:48 +0200 Subject: Update website package.json with original imports --- packages/website/package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index ae4798041..4cefa19a9 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -21,15 +21,15 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0xproject/contract-wrappers": "^1.0.0-rc.1", - "@0xproject/order-utils": "^1.0.0-rc.1", - "@0xproject/react-docs": "^1.0.0", - "@0xproject/react-shared": "^1.0.0", - "@0xproject/subproviders": "^1.0.0", - "@0xproject/types": "^1.0.0-rc.1", - "@0xproject/typescript-typings": "^1.0.0", - "@0xproject/utils": "^1.0.0", - "@0xproject/web3-wrapper": "^1.0.0", + "@0xproject/contract-wrappers": "^0.0.5", + "@0xproject/order-utils": "^0.0.9", + "@0xproject/react-docs": "^0.0.16", + "@0xproject/react-shared": "^0.2.3", + "@0xproject/subproviders": "^0.10.6", + "@0xproject/types": "^0.8.1", + "@0xproject/typescript-typings": "^0.4.3", + "@0xproject/utils": "^0.7.3", + "@0xproject/web3-wrapper": "^0.7.3", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit From cce2127f7252830723fafede929b3ce222afeccd Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 20 Jul 2018 10:55:47 -0700 Subject: Upgrade some @0xproject packages to 1.0.0 in website --- packages/website/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 4cefa19a9..3bcc585c7 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -23,13 +23,13 @@ "dependencies": { "@0xproject/contract-wrappers": "^0.0.5", "@0xproject/order-utils": "^0.0.9", - "@0xproject/react-docs": "^0.0.16", + "@0xproject/react-docs": "^1.0.0", "@0xproject/react-shared": "^0.2.3", - "@0xproject/subproviders": "^0.10.6", + "@0xproject/subproviders": "^1.0.0", "@0xproject/types": "^0.8.1", "@0xproject/typescript-typings": "^0.4.3", - "@0xproject/utils": "^0.7.3", - "@0xproject/web3-wrapper": "^0.7.3", + "@0xproject/utils": "^1.0.0", + "@0xproject/web3-wrapper": "^1.0.0", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit From d9a282bd92c155edba0fafe688df85a5576f210a Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 20 Jul 2018 11:56:20 -0700 Subject: Increase node heap size for webpack command --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website') diff --git a/packages/website/package.json b/packages/website/package.json index 3bcc585c7..99fd7cff3 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -7,7 +7,7 @@ "private": true, "description": "Website and 0x portal dapp", "scripts": { - "build": "NODE_ENV=production webpack; exit 0;", + "build": "NODE_ENV=production node --max_old_space_size=8192 ../../node_modules/.bin/webpack; exit 0;", "clean": "shx rm -f public/bundle*", "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", "watch_without_deps": "webpack-dev-server --content-base public --https", -- cgit