aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/assert/README.md50
-rw-r--r--packages/json-schemas/README.md49
-rw-r--r--packages/monorepo-scripts/README.md51
-rw-r--r--packages/subproviders/README.md79
-rw-r--r--packages/tslint-config/README.md57
-rw-r--r--packages/web3-wrapper/README.md52
-rw-r--r--packages/website/README.md61
7 files changed, 350 insertions, 49 deletions
diff --git a/packages/assert/README.md b/packages/assert/README.md
index b0dc9a451..052d56582 100644
--- a/packages/assert/README.md
+++ b/packages/assert/README.md
@@ -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
```
diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md
index d89f57a5e..94dfd8640 100644
--- a/packages/json-schemas/README.md
+++ b/packages/json-schemas/README.md
@@ -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
+```
diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md
new file mode 100644
index 000000000..452e0f94c
--- /dev/null
+++ b/packages/monorepo-scripts/README.md
@@ -0,0 +1,51 @@
+Mono repo scripts
+------
+
+This repository contains a few helpful scripts for working with this mono repo.
+
+## Usage
+
+#### Dependency versions
+In order to reduce the size of this repo, we try and use the same versions of dependencies between packages. To make it easier to discover version discrepancies between packages, you can run:
+
+```bash
+yarn deps_versions
+```
+
+This will list out any dependencies that differ in versions between packages.
+
+## Contributing
+
+We strongly recommend 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
+```
+
+### Clean
+
+```bash
+yarn clean
+```
+
+### Lint
+
+```bash
+yarn lint
+```
diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md
index 5fa31611a..9f01b4453 100644
--- a/packages/subproviders/README.md
+++ b/packages/subproviders/README.md
@@ -1,15 +1,33 @@
-Subproviders
------------
+@0xproject/subproviders
+--------
-A few useful subproviders.
+A few useful web3 subproviders including a LedgerSubprovider useful for adding Ledger Nano S support.
## Installation
```
-npm install @0xproject/subproviders --save
+yarn add @0xproject/subproviders
```
-## Subproviders
+## Usage
+
+Simply import the subprovider you are interested in using:
+
+```javascript
+import {
+ ledgerEthereumBrowserClientFactoryAsync as ledgerEthereumClientFactoryAsync,
+ LedgerSubprovider,
+} from '@0xproject/subproviders';
+
+const ledgerSubprovider = new LedgerSubprovider(
+ networkId,
+ ledgerEthereumClientFactoryAsync,
+);
+
+const accounts = await ledgerSubprovider.getAccountsAsync();
+```
+
+### Subproviders
#### Ledger Nano S subprovider
@@ -23,7 +41,50 @@ A subprovider which attempts to send an RPC call to a list of RPC endpoints sequ
A subprovider that relays all signing related requests to a particular provider (in our case the provider injected onto the web page), while sending all other requests to a different provider (perhaps your own backing Ethereum node or Infura).
-### Integration tests
+## Contributing
+
+We strongly recommend 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
+```
+
+```bash
+yarn install
+```
+
+### Build
+
+```bash
+yarn build
+```
+
+### Clean
+
+```bash
+yarn clean
+```
+
+### Lint
+
+```bash
+yarn lint
+```
+
+### Run tests
+
+#### Unit tests
+
+```bash
+yarn run test:unit
+```
+
+#### Integration tests
In order to run the integration tests, make sure you have a Ledger Nano S available.
@@ -37,3 +98,9 @@ Then run:
```
yarn test:integration
```
+
+#### All tests
+
+```bash
+yarn run test:all
+```
diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md
index 38a6bce45..b27d05df0 100644
--- a/packages/tslint-config/README.md
+++ b/packages/tslint-config/README.md
@@ -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
```
diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md
index 0df8c6333..c6e2163a3 100644
--- a/packages/web3-wrapper/README.md
+++ b/packages/web3-wrapper/README.md
@@ -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
+```
diff --git a/packages/website/README.md b/packages/website/README.md
index 40df07cb7..c050c6387 100644
--- a/packages/website/README.md
+++ b/packages/website/README.md
@@ -1,8 +1,5 @@
-<img src="https://github.com/0xProject/branding/blob/master/0x_Black_CMYK.png" width="200px" >
-
----
-
-[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. A full description of the protocol may be found in our [whitepaper][whitepaper-url].
+Website & 0x Portal DApp
+-----
This repository contains our website and [0x Portal DApp][portal-url] (over-the-counter exchange), facilitating trustless over-the-counter trading of Ethereum-based tokens using 0x protocol.
@@ -10,51 +7,63 @@ This repository contains our website and [0x Portal DApp][portal-url] (over-the-
[whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf
[portal-url]: https://0xproject.com/portal
-[![Join the chat at https://gitter.im/0xProject/contracts](https://badges.gitter.im/0xProject/contracts.svg)](https://gitter.im/0xProject/contracts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+## Contributing
+
+We strongly recommend 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.
-### Local Dev Setup
+Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
+
+## Local Dev Setup
Requires Node version 6.9.5 or higher.
Add the following to your `/etc/hosts` file:
```
-127.0.0.1 0xproject.dev
+127.0.0.1 0xproject.localhost
```
-Clone the [0x contracts repo](https://github.com/0xProject/contracts) into the same parent directory as this project.
+### Install dependencies:
-Install [yarn](https://yarnpkg.com/lang/en/docs/install/) in order to install the project dependencies more deterministically.
+```bash
+yarn install
+```
-Install dependencies:
+### Run dev server
-```
-yarn
+```bash
+yarn run dev
```
-Import smart contract artifacts from `contracts` repo:
+Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser.
-```
-yarn run update_contracts
+### Build
+
+```bash
+yarn build
```
-Start dev server:
+### Clean
+```bash
+yarn clean
```
-yarn run dev
+
+### Lint
+
+```bash
+yarn lint
```
-Visit [0xproject.dev:3572](http://0xproject.dev:3572) in your browser.
+### Resources
+
+##### Toolkit
+- [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional)
+- [BassCSS toolkit](http://basscss.com/)
+- [Material-UI component library](http://www.material-ui.com/#/)
##### Recommended Atom packages:
- [atom-typescript](https://atom.io/packages/atom-typescript)
- [linter-tslint](https://atom.io/packages/linter-tslint)
-
-##### Resources
-
-- [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional)
-- [BassCSS toolkit](http://basscss.com/)
-- [Material-UI](http://www.material-ui.com/#/)