From d76bc18bb7ccaa18f31df6e48722502e21610bdf Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 5 Apr 2018 09:57:21 +0900 Subject: [PATCH 1/3] Improve contributing section of all packages so they include building entire monorepo on first contribution --- packages/0x.js/README.md | 70 +++++++++++++++++++++++++-- packages/abi-gen/README.md | 58 ++++++++++++++++++++++ packages/assert/README.md | 32 ++++++++++-- packages/connect/README.md | 32 ++++++++++-- packages/contracts/README.md | 16 +++++- packages/deployer/README.md | 28 +++++++++-- packages/dev-utils/README.md | 64 ++++++++++++++++++++++++ packages/json-schemas/README.md | 28 +++++++++-- packages/monorepo-scripts/README.md | 28 +++++++++-- packages/react-docs-example/README.md | 22 ++++++++- packages/react-docs/README.md | 32 ++++++++++-- packages/react-shared/README.md | 38 +++++++++++---- packages/sol-cov/README.md | 44 +++++++++++++++-- packages/sra-report/README.md | 32 ++++++++++-- packages/subproviders/README.md | 24 +++++++-- packages/testnet-faucets/README.md | 52 ++++++++++++++++---- packages/tslint-config/README.md | 28 +++++++++-- packages/types/README.md | 30 ++++++++++-- packages/typescript-typings/README.md | 38 +++++++++++++-- packages/utils/README.md | 28 +++++++++-- packages/web3-wrapper/README.md | 28 +++++++++-- packages/website/README.md | 16 +++--- 22 files changed, 684 insertions(+), 84 deletions(-) diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md index 5b17dac8b8..f37fb04549 100644 --- a/packages/0x.js/README.md +++ b/packages/0x.js/README.md @@ -1,5 +1,9 @@ ## 0x.js +A TypeScript/Javascript library for interacting with the 0x protocol. + +### Read the [Documentation](0xproject.com/docs/0xjs). + ## Installation 0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. @@ -38,10 +42,66 @@ Download the UMD module from our [releases page](https://github.com/0xProject/0x ``` -## Documentation +## Contributing -Extensive documentation of 0x.js can be found on [our website][docs-url]. +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. -[website-url]: https://0xproject.com/ -[whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf -[docs-url]: https://0xproject.com/docs/0xjs +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 + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index 899b4845e4..e193c6fccb 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -57,3 +57,61 @@ See the [type definition](https://github.com/0xProject/0x-monorepo/tree/developm ## Output files Output files will be generated within an output folder with names converted to camel case and taken from abi file names. If you already have some files in that folder they will be overwritten. + +## Contributing + +We welcome improvements and fixes from the wider community! 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 + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` diff --git a/packages/assert/README.md b/packages/assert/README.md index 7f80e7e5da..cbf78ad531 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -26,11 +26,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -46,10 +46,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/connect/README.md b/packages/connect/README.md index 7087214d67..02d166d618 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -23,11 +23,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -43,10 +43,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 7628b057b7..286ef019cf 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -34,11 +34,25 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch diff --git a/packages/deployer/README.md b/packages/deployer/README.md index 812e8c31b8..22848bddeb 100644 --- a/packages/deployer/README.md +++ b/packages/deployer/README.md @@ -41,11 +41,11 @@ var Compiler = require('@0xproject/deployer').Compiler; ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -61,16 +61,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index d7e580d9f4..ce03a740e9 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -26,3 +26,67 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], } ``` + +## Contributing + +We welcome improvements and fixes from the wider community! 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 + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index 980d174163..fa9da3b775 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -32,11 +32,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -52,16 +52,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index dbdfdf1353..4f4f13b212 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -16,11 +16,11 @@ 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -36,11 +36,25 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch @@ -57,3 +71,9 @@ yarn clean ```bash yarn lint ``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/react-docs-example/README.md b/packages/react-docs-example/README.md index 7b2547b20d..7eeade9600 100644 --- a/packages/react-docs-example/README.md +++ b/packages/react-docs-example/README.md @@ -20,10 +20,22 @@ Then install dependencies yarn install ``` -#### Start the dev server +### Initial setup + +The **first** time you work with this package, you must build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: ```bash -yarn dev +yarn lerna:rebuild +``` + +Note: If you move this package out of the monorepo, it will work without this step. Make sure you copy it out on the `master` branch since the `development` version might rely on not-yet published changes to other packages. + +### Run dev server + +The the `react-docs-example` root directory, run: + +```bash +yarn run dev ``` ### Deploy Example to S3 bucket @@ -42,6 +54,12 @@ yarn deploy_example yarn build ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 9be370f10c..479a24cc32 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -51,11 +51,11 @@ Feel free to contribute to these improvements! ## Contributing -We strongly encourage the community to help us make improvements. To report bugs within this package, please create an issue in this repository. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -71,10 +71,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md index 9165cf78de..ad32a41a21 100644 --- a/packages/react-shared/README.md +++ b/packages/react-shared/README.md @@ -18,11 +18,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -38,18 +38,38 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash yarn lint ``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/sol-cov/README.md b/packages/sol-cov/README.md index 5591b9731e..130db039e9 100644 --- a/packages/sol-cov/README.md +++ b/packages/sol-cov/README.md @@ -24,11 +24,11 @@ var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; ## Contributing -We strongly encourage the community to help us make improvements. To report bugs within this package, please create an issue in this repository. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -42,8 +42,46 @@ Then install dependencies yarn install ``` +### Build + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash yarn lint ``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/sra-report/README.md b/packages/sra-report/README.md index 299d575d81..48d56a09bd 100644 --- a/packages/sra-report/README.md +++ b/packages/sra-report/README.md @@ -87,11 +87,11 @@ In order to provide a custom environment to the tool, perform the following step ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -107,10 +107,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index ac92b89d24..60fd41fc65 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -22,11 +22,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -34,17 +34,33 @@ If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: yarn config set workspaces-experimental true ``` +Then install dependencies + ```bash yarn install ``` ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md index 2f6ae347f6..0ae1667a36 100644 --- a/packages/testnet-faucets/README.md +++ b/packages/testnet-faucets/README.md @@ -4,15 +4,15 @@ This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZR ## Installation -This is a private package and therefore is not published to npm. In order to build and run this package locally, see the [Install Dependencies](#Install-Dependencies) section and onwards below. +This is a private package and therefore is not published to npm. In order to build and run this package locally, see the contributing instructions below. ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -26,6 +26,44 @@ Then install dependencies yarn install ``` +### Build + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + ### Start Set the following environment variables: @@ -125,9 +163,3 @@ docker run -d \ -e INFURA_API_KEY=$INFURA_API_KEY \ testnet-faucets ``` - -### Lint - -```bash -yarn lint -``` diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index b517f2d956..e9aa5025c3 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -20,11 +20,11 @@ Add the following to your `tslint.json` file ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -40,16 +40,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/types/README.md b/packages/types/README.md index b971eaee7f..b51cf3f3a0 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -24,13 +24,13 @@ import { TransactionReceipt, TxData, TxDataPayable } from '@0xproject/types'; ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies -If you don't have yarn workspaces e`nabled (Yarn < v1.0) - enable them: +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: ```bash yarn config set workspaces-experimental true @@ -44,16 +44,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/typescript-typings/README.md b/packages/typescript-typings/README.md index 9a74739f39..5586137bee 100644 --- a/packages/typescript-typings/README.md +++ b/packages/typescript-typings/README.md @@ -20,11 +20,11 @@ This will allow the TS compiler to first look into that repo and then fallback t ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -38,6 +38,38 @@ Then install dependencies yarn install ``` +### Build + +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + +```bash +yarn build +``` + +or continuously rebuild on change: + +```bash +yarn build:watch +``` + +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/utils/README.md b/packages/utils/README.md index fde0780a9b..acda45c230 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -24,11 +24,11 @@ import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -44,16 +44,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index e7491acb0f..10cbb6a7ef 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -20,11 +20,11 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## 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. +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. -### Install Dependencies +### Install dependencies If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: @@ -40,16 +40,36 @@ yarn install ### Build +If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + +Or continuously rebuild on change: + +```bash +yarn dev +``` + +You can also build this specific package by running the following from within its directory: + ```bash yarn build ``` -or +or continuously rebuild on change: ```bash yarn build:watch ``` +### Clean + +```bash +yarn clean +``` + ### Lint ```bash diff --git a/packages/website/README.md b/packages/website/README.md index 042df52de5..0e23b02dfc 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -28,20 +28,24 @@ Add the following to your `/etc/hosts` file: yarn install ``` +### Initial setup + +The **first** time you work with this package, you must build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: + +```bash +yarn lerna:rebuild +``` + ### Run dev server +The the `website` root directory, run: + ```bash yarn run dev ``` Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser. -### Build - -```bash -yarn build -``` - ### Clean ```bash From 29d38593d6313412fb820f2311bb9accb66e6684 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 5 Apr 2018 10:01:41 +0900 Subject: [PATCH 2/3] Fix contributing links --- packages/0x.js/README.md | 2 +- packages/abi-gen/README.md | 2 +- packages/assert/README.md | 2 +- packages/connect/README.md | 2 +- packages/deployer/README.md | 2 +- packages/dev-utils/README.md | 2 +- packages/json-schemas/README.md | 2 +- packages/monorepo-scripts/README.md | 2 +- packages/react-docs-example/README.md | 2 +- packages/react-docs/README.md | 2 +- packages/react-shared/README.md | 2 +- packages/sol-cov/README.md | 2 +- packages/sra-report/README.md | 2 +- packages/subproviders/README.md | 2 +- packages/testnet-faucets/README.md | 2 +- packages/tslint-config/README.md | 2 +- packages/types/README.md | 2 +- packages/typescript-typings/README.md | 2 +- packages/utils/README.md | 2 +- packages/web3-wrapper/README.md | 2 +- packages/website/README.md | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md index f37fb04549..46848cbdd3 100644 --- a/packages/0x.js/README.md +++ b/packages/0x.js/README.md @@ -46,7 +46,7 @@ Download the UMD module from our [releases page](https://github.com/0xProject/0x 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. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index e193c6fccb..301bd709f5 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -62,7 +62,7 @@ Output files will be generated within an output folder with names converted to c We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/assert/README.md b/packages/assert/README.md index cbf78ad531..598fee613b 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -28,7 +28,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/connect/README.md b/packages/connect/README.md index 02d166d618..a57fefa598 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -25,7 +25,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/deployer/README.md b/packages/deployer/README.md index 22848bddeb..d8b049bdfe 100644 --- a/packages/deployer/README.md +++ b/packages/deployer/README.md @@ -43,7 +43,7 @@ var Compiler = require('@0xproject/deployer').Compiler; We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index ce03a740e9..2b183f1c78 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -31,7 +31,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +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 fa9da3b775..e8cece63b2 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -34,7 +34,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index 4f4f13b212..a740ba28a3 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -18,7 +18,7 @@ This will list out any dependencies that differ in versions between packages. We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/react-docs-example/README.md b/packages/react-docs-example/README.md index 7eeade9600..ff821dba83 100644 --- a/packages/react-docs-example/README.md +++ b/packages/react-docs-example/README.md @@ -35,7 +35,7 @@ Note: If you move this package out of the monorepo, it will work without this st The the `react-docs-example` root directory, run: ```bash -yarn run dev +yarn dev ``` ### Deploy Example to S3 bucket diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 479a24cc32..5a46b84f06 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -53,7 +53,7 @@ Feel free to contribute to these improvements! We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md index ad32a41a21..0b4188180c 100644 --- a/packages/react-shared/README.md +++ b/packages/react-shared/README.md @@ -20,7 +20,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/sol-cov/README.md b/packages/sol-cov/README.md index 130db039e9..8cc7dca6c3 100644 --- a/packages/sol-cov/README.md +++ b/packages/sol-cov/README.md @@ -26,7 +26,7 @@ var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/sra-report/README.md b/packages/sra-report/README.md index 48d56a09bd..806ac3bf48 100644 --- a/packages/sra-report/README.md +++ b/packages/sra-report/README.md @@ -89,7 +89,7 @@ In order to provide a custom environment to the tool, perform the following step We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index 60fd41fc65..2936be545c 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -24,7 +24,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md index 0ae1667a36..93f97e1b7a 100644 --- a/packages/testnet-faucets/README.md +++ b/packages/testnet-faucets/README.md @@ -10,7 +10,7 @@ This is a private package and therefore is not published to npm. In order to bui We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +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 e9aa5025c3..d90b3cf738 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 We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/types/README.md b/packages/types/README.md index b51cf3f3a0..665701ea4f 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -26,7 +26,7 @@ import { TransactionReceipt, TxData, TxDataPayable } from '@0xproject/types'; We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/typescript-typings/README.md b/packages/typescript-typings/README.md index 5586137bee..968b2e87cc 100644 --- a/packages/typescript-typings/README.md +++ b/packages/typescript-typings/README.md @@ -22,7 +22,7 @@ This will allow the TS compiler to first look into that repo and then fallback t We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/utils/README.md b/packages/utils/README.md index acda45c230..914404937d 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -26,7 +26,7 @@ import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +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 10cbb6a7ef..1ff85420a8 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -22,7 +22,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. -Please read our [contribution guidelines](./CONTRIBUTING.md) before getting started. +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. ### Install dependencies diff --git a/packages/website/README.md b/packages/website/README.md index 0e23b02dfc..d93d189358 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -41,7 +41,7 @@ yarn lerna:rebuild The the `website` root directory, run: ```bash -yarn run dev +yarn dev ``` Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser. From 9745dfe2f4f15f0c23c150f3b375ff9ed2ace063 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 5 Apr 2018 11:43:48 +0900 Subject: [PATCH 3/3] Use depcheck async support --- .../monorepo-scripts/src/find_unused_dependencies.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/monorepo-scripts/src/find_unused_dependencies.ts b/packages/monorepo-scripts/src/find_unused_dependencies.ts index 374cba2e3b..fa6088a7d0 100644 --- a/packages/monorepo-scripts/src/find_unused_dependencies.ts +++ b/packages/monorepo-scripts/src/find_unused_dependencies.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import * as depcheck from 'depcheck'; +import * as depcheckAsync from 'depcheck'; import * as fs from 'fs'; import lernaGetPackages = require('lerna-get-packages'); import * as _ from 'lodash'; @@ -35,11 +35,3 @@ const IGNORE_PACKAGES = ['@0xproject/deployer']; utils.log(err); process.exit(1); }); - -async function depcheckAsync(path: string, opts: any): Promise { - return new Promise((resolve, reject) => { - depcheck(path, opts, (unused: any) => { - resolve(unused); - }); - }); -}