Merge pull request #279 from 0xProject/feature/READMEs

Write 4 README's
This commit is contained in:
Leonid
2017-12-20 15:17:23 +01:00
committed by GitHub
4 changed files with 191 additions and 17 deletions

View File

@@ -1,10 +1,54 @@
assert
@0xproject/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
```typescript
import {assert} from '@0xproject/assert';
assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```
## Contributing
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.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
```bash
yarn build
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

@@ -1,16 +1,17 @@
json-schemas
------------
@0xproject/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,39 @@ 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 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.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
```bash
yarn build
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

@@ -1,10 +1,57 @@
tslint-config
-------------
@0xproject/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
Add the following to your `tslint.json` file
```json
{
"extends": [
"@0xproject/tslint-config"
]
}
```
## Contributing
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.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
```bash
yarn build
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```

View File

@@ -1,10 +1,56 @@
Web3 wrapper
@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
## Install
## Installation
```bash
yarn add @0xproject/web3-wrapper
```
## Usage
```typescript
import {Web3Wrapper} from '@0xproject/web3-wrapper';
const web3 = ...;
const web3Wrapper = new Web3Wrapper(web3.currentProvider);
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
```
## Contributing
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.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Build
```bash
yarn build
```
### Lint
```bash
yarn lint
```
### Run Tests
```bash
yarn test
```