From de6fe257518e661b35df080ab54b1adc6819af5b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 19 Dec 2017 16:53:41 +0100 Subject: Write 4 README's --- packages/assert/README.md | 34 +++++++++++++++++++++++++++++-- packages/json-schemas/README.md | 37 ++++++++++++++++++++++++++++----- packages/tslint-config/README.md | 44 ++++++++++++++++++++++++++++++++++++---- packages/web3-wrapper/README.md | 32 ++++++++++++++++++++++++++++- 4 files changed, 135 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index b0dc9a451..2bcb76f50 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -3,8 +3,38 @@ assert Standard type and schema assertions to be used across all 0x projects and packages -## Install +## Installation ```bash -npm install @0xproject/assert --save +yarn add @0xproject/assert ``` + +## Usage + +TODO - Custom documentation page is in progress. + +## Contributing + +We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. + +[CONTRIBUTING.md](../../CONTRIBUTING.md) + +## Install Dependencies + +If you don't have yarn workspaces enabled - enable them: +`yarn config set workspaces-experimental true` + +Then install dependencies +`yarn install` + +## Build + +`yarn build` + +## Lint + +`yarn lint` + +## Run Tests + +`yarn test` diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index d89f57a5e..4b4d148ed 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -1,16 +1,17 @@ json-schemas ------------- +------ Contains 0x-related json schemas -## Install: +## Installation ```bash -npm install @0xproject/json-schemas --save +yarn add @0xproject/json-schemas ``` -## Usage: -``` +## Usage + +```javascript import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; const {orderSchema} = schemas; @@ -22,3 +23,29 @@ const order = { const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean ``` + +## Contributing + +We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. + +[CONTRIBUTING.md](../../CONTRIBUTING.md) + +## Install Dependencies + +If you don't have yarn workspaces enabled - enable them: +`yarn config set workspaces-experimental true` + +Then install dependencies +`yarn install` + +## Build + +`yarn build` + +## Lint + +`yarn lint` + +## Run Tests + +`yarn test` diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index 38a6bce45..b43525827 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -1,10 +1,46 @@ tslint-config -------------- +------ -Lint rules related to 0xProject for TSLint. +TSLint configuration and custom linter rules used by 0xProject. -## Install: +## Installation ```bash -npm install @0xproject/tslint-config --save-dev +yarn add --dev @0xproject/tslint-config ``` + +## Usage + +```json +{ + "extends": [ + "@0xproject/tslint-config" + ] +} +``` + +## Contributing + +We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. + +[CONTRIBUTING.md](../../CONTRIBUTING.md) + +## Install Dependencies + +If you don't have yarn workspaces enabled - enable them: +`yarn config set workspaces-experimental true` + +Then install dependencies +`yarn install` + +## Build + +`yarn build` + +## Lint + +`yarn lint` + +## Run Tests + +`yarn test` diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 0df8c6333..04f2b8ca0 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -3,8 +3,38 @@ Web3 wrapper Wrapped version of web3 with nicer interface to be used across 0x projects and packages -## Install +## Installation ```bash yarn add @0xproject/web3-wrapper ``` + +## Usage + +TODO - Custom documentation page is in progress. + +## Contributing + +We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. + +[CONTRIBUTING.md](../../CONTRIBUTING.md) + +## Install Dependencies + +If you don't have yarn workspaces enabled - enable them: +`yarn config set workspaces-experimental true` + +Then install dependencies +`yarn install` + +## Build + +`yarn build` + +## Lint + +`yarn lint` + +## Run Tests + +`yarn test` -- cgit v1.2.3 From ecc6cb2b7c8aff181341474830cd482579db7ca1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 19 Dec 2017 18:03:44 +0100 Subject: Address feedback --- packages/assert/README.md | 28 +++++++++++++++++++--------- packages/json-schemas/README.md | 28 +++++++++++++++++++--------- packages/tslint-config/README.md | 28 +++++++++++++++++++--------- packages/web3-wrapper/README.md | 28 +++++++++++++++++++--------- 4 files changed, 76 insertions(+), 36 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index 2bcb76f50..7bce1b98f 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -19,22 +19,32 @@ We strongly encourage our community members to help us make improvements and to [CONTRIBUTING.md](../../CONTRIBUTING.md) -## Install Dependencies +### Install Dependencies If you don't have yarn workspaces enabled - enable them: -`yarn config set workspaces-experimental true` +```bash +yarn config set workspaces-experimental true +``` Then install dependencies -`yarn install` +```bash +yarn install +``` -## Build +### Build -`yarn build` +```bash +yarn build +``` -## Lint +### Lint -`yarn lint` +```bash +yarn lint +``` -## Run Tests +### Run Tests -`yarn test` +```bash +yarn test +``` diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 4b4d148ed..f22e208ea 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -30,22 +30,32 @@ We strongly encourage our community members to help us make improvements and to [CONTRIBUTING.md](../../CONTRIBUTING.md) -## Install Dependencies +### Install Dependencies If you don't have yarn workspaces enabled - enable them: -`yarn config set workspaces-experimental true` +```bash +yarn config set workspaces-experimental true +``` Then install dependencies -`yarn install` +```bash +yarn install +``` -## Build +### Build -`yarn build` +```bash +yarn build +``` -## Lint +### Lint -`yarn lint` +```bash +yarn lint +``` -## Run Tests +### Run Tests -`yarn test` +```bash +yarn test +``` diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index b43525827..ef4fba022 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -25,22 +25,32 @@ We strongly encourage our community members to help us make improvements and to [CONTRIBUTING.md](../../CONTRIBUTING.md) -## Install Dependencies +### Install Dependencies If you don't have yarn workspaces enabled - enable them: -`yarn config set workspaces-experimental true` +```bash +yarn config set workspaces-experimental true +``` Then install dependencies -`yarn install` +```bash +yarn install +``` -## Build +### Build -`yarn build` +```bash +yarn build +``` -## Lint +### Lint -`yarn lint` +```bash +yarn lint +``` -## Run Tests +### Run Tests -`yarn test` +```bash +yarn test +``` diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 04f2b8ca0..db879d3cf 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -19,22 +19,32 @@ We strongly encourage our community members to help us make improvements and to [CONTRIBUTING.md](../../CONTRIBUTING.md) -## Install Dependencies +### Install Dependencies If you don't have yarn workspaces enabled - enable them: -`yarn config set workspaces-experimental true` +```bash +yarn config set workspaces-experimental true +``` Then install dependencies -`yarn install` +```bash +yarn install +``` -## Build +### Build -`yarn build` +```bash +yarn build +``` -## Lint +### Lint -`yarn lint` +```bash +yarn lint +``` -## Run Tests +### Run Tests -`yarn test` +```bash +yarn test +``` -- cgit v1.2.3 From 3579f063d6fb09f7a091d3f896bd29edb84b3f55 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 19 Dec 2017 18:04:42 +0100 Subject: Fix the headers --- packages/assert/README.md | 2 +- packages/json-schemas/README.md | 2 +- packages/tslint-config/README.md | 2 +- packages/web3-wrapper/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index 7bce1b98f..5b9b6ccab 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -1,4 +1,4 @@ -assert +@0xproject/assert ------ Standard type and schema assertions to be used across all 0x projects and packages diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index f22e208ea..1621699e3 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -1,4 +1,4 @@ -json-schemas +@0xproject/json-schemas ------ Contains 0x-related json schemas diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index ef4fba022..f737062b2 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -1,4 +1,4 @@ -tslint-config +@0xproject/tslint-config ------ TSLint configuration and custom linter rules used by 0xProject. diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index db879d3cf..c8a984435 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -1,4 +1,4 @@ -Web3 wrapper +@0xproject/web3-wrapper ------ Wrapped version of web3 with nicer interface to be used across 0x projects and packages -- cgit v1.2.3 From c3508dcdc6e2cf459bf076c0bb0087338cf96f7a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 20 Dec 2017 14:10:35 +0100 Subject: Change CONTRIBUTING section --- packages/assert/README.md | 8 ++++++-- packages/json-schemas/README.md | 2 +- packages/tslint-config/README.md | 2 +- packages/web3-wrapper/README.md | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index 5b9b6ccab..585b4f39e 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -11,13 +11,17 @@ yarn add @0xproject/assert ## Usage -TODO - Custom documentation page is in progress. +```typescript +import {assert} from '@0xproject/assert'; + +assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount); +``` ## Contributing We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. -[CONTRIBUTING.md](../../CONTRIBUTING.md) +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install Dependencies diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 1621699e3..1c0d001b5 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -28,7 +28,7 @@ const isValid: boolean = validator.isValid(order, orderSchema); // Only returns We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. -[CONTRIBUTING.md](../../CONTRIBUTING.md) +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install Dependencies diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index f737062b2..bbd0fb0f2 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -23,7 +23,7 @@ yarn add --dev @0xproject/tslint-config We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. -[CONTRIBUTING.md](../../CONTRIBUTING.md) +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install Dependencies diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index c8a984435..3624cea8c 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -17,7 +17,7 @@ TODO - Custom documentation page is in progress. We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. -[CONTRIBUTING.md](../../CONTRIBUTING.md) +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install Dependencies -- cgit v1.2.3 From 8ed776e113f0e249d50aa9e74b459b770ff62cee Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 20 Dec 2017 14:17:17 +0100 Subject: Fix yarn workspaces explanation --- packages/assert/README.md | 2 +- packages/json-schemas/README.md | 2 +- packages/tslint-config/README.md | 3 ++- packages/web3-wrapper/README.md | 12 +++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index 585b4f39e..40854cfa2 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -25,7 +25,7 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies -If you don't have yarn workspaces enabled - enable them: +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: ```bash yarn config set workspaces-experimental true ``` diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 1c0d001b5..21ba92a37 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -32,7 +32,7 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies -If you don't have yarn workspaces enabled - enable them: +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: ```bash yarn config set workspaces-experimental true ``` diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index bbd0fb0f2..e943bc0db 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -11,6 +11,7 @@ yarn add --dev @0xproject/tslint-config ## Usage +Add the following to your `tslint.json` file ```json { "extends": [ @@ -27,7 +28,7 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies -If you don't have yarn workspaces enabled - enable them: +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: ```bash yarn config set workspaces-experimental true ``` diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 3624cea8c..2aac1124b 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -1,7 +1,7 @@ @0xproject/web3-wrapper ------ -Wrapped version of web3 with nicer interface to be used across 0x projects and packages +Wrapped version of web3 with a nicer interface that is used across 0x projects and packages ## Installation @@ -11,7 +11,13 @@ yarn add @0xproject/web3-wrapper ## Usage -TODO - Custom documentation page is in progress. +```typescript +import {Web3Wrapper} from '@0xproject/web3-wrapper'; + +const web3 = ...; +const web3Wrapper = new Web3Wrapper(web3.currentProvider); +const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); +``` ## Contributing @@ -21,7 +27,7 @@ Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting ### Install Dependencies -If you don't have yarn workspaces enabled - enable them: +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: ```bash yarn config set workspaces-experimental true ``` -- cgit v1.2.3 From bf1603839ee5b7e8a1b1db32a0d037b3680a38d6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 20 Dec 2017 14:21:39 +0100 Subject: Change contributing test --- packages/assert/README.md | 2 +- packages/json-schemas/README.md | 2 +- packages/tslint-config/README.md | 2 +- packages/web3-wrapper/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/assert/README.md b/packages/assert/README.md index 40854cfa2..052d56582 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -19,7 +19,7 @@ assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount); ## Contributing -We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. +We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 21ba92a37..94dfd8640 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -26,7 +26,7 @@ const isValid: boolean = validator.isValid(order, orderSchema); // Only returns ## Contributing -We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. +We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index e943bc0db..b27d05df0 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -22,7 +22,7 @@ Add the following to your `tslint.json` file ## Contributing -We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. +We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 2aac1124b..c6e2163a3 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -21,7 +21,7 @@ const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); ## Contributing -We strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. +We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. -- cgit v1.2.3