diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-15 01:23:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-15 01:23:50 +0800 |
commit | 478f6ed011185b66ac87323c6d9ad1f598060760 (patch) | |
tree | 09c4619287e0fc874c0258f722f543b7c6ce7f5e | |
parent | c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6 (diff) | |
download | dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar.gz dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar.bz2 dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar.lz dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar.xz dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.tar.zst dexon-sol-tools-478f6ed011185b66ac87323c6d9ad1f598060760.zip |
Move from using lerna multi-package commands to wsrun, update README's accordingly
63 files changed, 286 insertions, 449 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index dbd8b2926..6bf897c1c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: - run: wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip - run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot - run: node ./node_modules/lerna/bin/lerna.js bootstrap - - run: yarn lerna:run build + - run: yarn build - save_cache: key: repo-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -48,7 +48,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope 0x.js test:circleci + - run: yarn wsrun test:circleci 0x.js - save_cache: key: coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -65,7 +65,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope contracts test:circleci + - run: yarn wsrun test:circleci contracts - save_cache: key: coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -82,7 +82,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope @0xproject/sol-compiler test:circleci + - run: yarn wsrun test:circleci @0xproject/sol-compiler - save_cache: key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -99,7 +99,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore @0xproject/sol-compiler test:circleci + - run: yarn wsrun test:circleci --exclude contracts --exclude 0x.js --exclude @0xproject/sol-compiler --stages --exclude-missing - save_cache: key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -136,7 +136,7 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lerna:run lint + - run: yarn wsrun lint --parallel --exclude-missing prettier: working_directory: ~/repo docker: @@ -78,45 +78,86 @@ We strongly recommend that the community help us make improvements and determine ### 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 -Build all packages. You need to do this before working on any given package. Although these packages -as independent, when run from within the monorepo, they are internally symlinked, to make development -easier. You can change several packages and run the changes without publishing them first to NPM. When -running `rebuild`, Lerna will figure out the dependency order of all the packages, and build them in -this order. +To build all packages: +```bash +yarn build +``` + +To build a specific package: +```bash +PKG=@0xproject/web3-wrapper yarn build +``` + +### Watch +To re-build all packages on change: ```bash -yarn lerna:rebuild +yarn watch ``` -Or continuously rebuild on change: +To watch a specific package and all it's dependent packages: +```bash +PKG=[NPM_PACKAGE_NAME] yarn watch + +e.g +PKG=@0xproject/web3-wrapper yarn watch +``` +### Clean + +Clean all packages: ```bash -yarn dev +yarn clean +``` + +Clean a specific package +```bash +PKG=0x.js yarn clean +``` + +### Rebuild + +To re-build (clean & build) all packages: +```bash +yarn rebuild +``` + +To re-build (clean & build) a specific package & it's deps: +```bash +PKG=0x.js yarn rebuild ``` ### Lint -Lint all packages +Lint all packages: +```bash +yarn lint +``` +Lint a specific package: ```bash -yarn lerna:run lint +PKG=0x.js yarn lint ``` ### Run Tests +Run all tests: +```bash +yarn test +``` + +Run a specific package's test: ```bash -yarn lerna:test +PKG=@0xproject/web3-wrapper yarn test ``` diff --git a/package.json b/package.json index 3f2486656..231371623 100644 --- a/package.json +++ b/package.json @@ -5,23 +5,24 @@ "packages/*" ], "scripts": { - "dev": "lerna run --parallel build:watch", "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"", "prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc", "prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc", "report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls", "test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js", - "lerna:install": "yarn install", - "lerna:run": "lerna run", - "lerna:test": "lerna run test", - "lerna:clean": "lerna run clean", - "lerna:build": "lerna run build", - "lerna:rebuild": "run-s lerna:clean lerna:build", - "lerna:publish": "run-s lerna:install lerna:rebuild script:publish", - "lerna:publish:dry": "run-s lerna:install lerna:rebuild script:publish:dry", - "lerna:stage_docs": "lerna run docs:stage", + "publish": "run-s install rebuild script:publish", + "publish:dry": "run-s install rebuild script:publish:dry", "script:publish": "node ./packages/monorepo-scripts/lib/publish.js", - "script:publish:dry": "IS_DRY_RUN=true yarn script:publish" + "script:publish:dry": "IS_DRY_RUN=true yarn script:publish", + "install": "yarn install", + "wsrun": "wsrun", + "watch": "wsrun watch $PKG -r --stages --done-criteria='complete|successfully'", + "build": "wsrun build $PKG -r --stages", + "clean": "wsrun clean $PKG -r --parallel", + "rebuild": "run-s clean build", + "test": "wsrun test $PKG --serial --exclude-missing", + "stage_docs": "wsrun docs:stage $PKG --parallel --exclude-missing", + "lint": "wsrun lint $PKG --parallel --exclude-missing" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" @@ -33,6 +34,7 @@ "lcov-result-merger": "^2.0.0", "lerna": "^2.5.1", "npm-run-all": "^4.1.2", - "prettier": "^1.11.1" + "prettier": "^1.11.1", + "wsrun": "^2.2.0" } } diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md index 8d84f6c82..fd6217151 100644 --- a/packages/0x.js/README.md +++ b/packages/0x.js/README.md @@ -64,28 +64,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=0x.js yarn build ``` 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 +PKG=0x.js yarn watch ``` ### Clean diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 36ea0751f..8dcd8a6e2 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -12,7 +12,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean generate_contract_wrappers", "build": "run-p build:umd:prod build:commonjs; exit 0;", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'", diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index 301bd709f..4240ba7ba 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -80,28 +80,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/abi-gen yarn build ``` 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 +PKG=@0xproject/abi-gen yarn watch ``` ### Clean diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 82184a596..a151ff2e2 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "lint": "tslint --project .", "clean": "shx rm -rf lib scripts", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", diff --git a/packages/assert/README.md b/packages/assert/README.md index 598fee613..1f2139d47 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -46,28 +46,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/assert yarn build ``` 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 +PKG=@0xproject/assert yarn watch ``` ### Clean diff --git a/packages/assert/package.json b/packages/assert/package.json index f86bbb33f..dc72313cb 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib test_temp scripts", "lint": "tslint --project .", diff --git a/packages/base-contract/README.md b/packages/base-contract/README.md index a689d0130..4f2426c2e 100644 --- a/packages/base-contract/README.md +++ b/packages/base-contract/README.md @@ -44,14 +44,16 @@ yarn install ### Build +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + ```bash -yarn build +PKG=@0xproject/base-contract yarn build ``` -or +Or continuously rebuild on change: ```bash -yarn build:watch +PKG=@0xproject/base-contract yarn watch ``` ### Lint diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 90253616b..565d06416 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "test": "run-s clean build run_mocha", diff --git a/packages/connect/README.md b/packages/connect/README.md index a57fefa59..9d8cb9215 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -43,28 +43,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/connect yarn build ``` 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 +PKG=@0xproject/connect yarn watch ``` ### Clean diff --git a/packages/connect/package.json b/packages/connect/package.json index 2930de98e..379d8f698 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -12,7 +12,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib test_temp scripts", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", diff --git a/packages/contract-wrappers/README.md b/packages/contract-wrappers/README.md index 0fca4c762..4d7820056 100644 --- a/packages/contract-wrappers/README.md +++ b/packages/contract-wrappers/README.md @@ -48,19 +48,19 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/contract-wrappers yarn build ``` Or continuously rebuild on change: ```bash -yarn dev +PKG=@0xproject/contract-wrappers yarn watch ``` -You can also build this specific package by running the following from within its directory: + ```bash yarn build @@ -69,7 +69,7 @@ yarn build or continuously rebuild on change: ```bash -yarn build:watch +yarn watch ``` ### Clean diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 2b53f5c8d..1ebdf7252 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -11,7 +11,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean generate_contract_wrappers", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'", "lint": "tslint --project .", diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 16e253549..23551b69d 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -34,28 +34,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=contracts yarn build ``` 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 +PKG=contracts yarn watch ``` ### Clean diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 557effca2..14f6e53f0 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -8,7 +8,7 @@ "test": "test" }, "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean copy_artifacts generate_contract_wrappers", "copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/1.0.0/**/*' ./lib/src/artifacts;", "build": "tsc", diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index 2b183f1c7..1c3bd3a3f 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -49,28 +49,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/dev-utils yarn build ``` 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 +PKG=@0xproject/dev-utils yarn watch ``` ### Clean diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 67b448024..b899409ab 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test": "run-s clean build run_mocha", "test:circleci": "yarn test:coverage", diff --git a/packages/fill-scenarios/README.md b/packages/fill-scenarios/README.md index e4cec0695..67df0941f 100644 --- a/packages/fill-scenarios/README.md +++ b/packages/fill-scenarios/README.md @@ -38,28 +38,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/fill-scenarios yarn build ``` 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 +PKG=@0xproject/fill-scenarios yarn watch ``` ### Clean diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 6a728b742..0a3742e8c 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean generate_contract_wrappers", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'", "build": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index ffa8e947a..ab57833be 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -52,28 +52,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/json-schemas yarn build ``` 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 +PKG=@0xproject/json-schemas yarn watch ``` ### Clean diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 9da9da2b7..0926474d2 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "lint": "tslint --project .", "test": "run-s clean build run_mocha", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index be1a33d65..204d940ad 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -4,7 +4,7 @@ "private": true, "description": "Example solidity project using 0x dev tools", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "lint": "tslint --project .", "clean": "shx rm -rf lib artifacts src/contract_wrappers", "prebuild": "run-s clean compile generate_contract_wrappers copy_artifacts", diff --git a/packages/migrations/README.md b/packages/migrations/README.md index 15129ae85..83a49fefb 100644 --- a/packages/migrations/README.md +++ b/packages/migrations/README.md @@ -24,28 +24,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/migrations yarn build ``` 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 +PKG=@0xproject/migrations yarn watch ``` ### Clean diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 95922f7b6..5eaa9530c 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean compile copy_artifacts generate_contract_wrappers", "copy_artifacts": "copyfiles -u 4 'artifacts/1.0.0/**/*' ./lib/src/artifacts", "build": "tsc", diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index cec77a10d..22b449870 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -4,7 +4,7 @@ This repository contains a few helpful scripts for working with this mono repo. #### Scripts -**`yarn deps_versions`**: Since we use Lerna + Yarn workspaces, shared dependencies between packages in the monorepo get hoisted to a top-level `node_modules` directory. If two packages use different versions of the same dependency however, both get installed. To avoid having many versions of a dependency installed, we try to keep dependency versions the same across packages in the monorepo. This script will list any dependencies for which we have multiple versions installed. We can then go through them and try to consolidate to a single version where possible. +**`yarn deps_versions`**: Since we are a Yarn workspaces monorepo, shared dependencies between packages in the monorepo get hoisted to a top-level `node_modules` directory. If two packages use different versions of the same dependency however, both get installed. To avoid having many versions of a dependency installed, we try to keep dependency versions the same across packages in the monorepo. This script will list any dependencies for which we have multiple versions installed. We can then go through them and try to consolidate to a single version where possible. **`yarn find_unused_deps`**: Sometimes we accidentally leave dependencies listed in `package.json` that are no longer being used. This script finds potential dependencies that might no longer be in use. Please verify that it is no longer in use before removing, the `depcheck` package we use under-the-hood doesn't handle some TS quirks perfectly. @@ -46,28 +46,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/monorepo-scripts yarn build ``` 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 +PKG=@0xproject/monorepo-scripts yarn watch ``` ### Clean diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index ef5840546..ca82a5531 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "lint": "tslint --project .", "clean": "shx rm -rf lib", "build": "tsc", @@ -26,7 +26,6 @@ "url": "https://github.com/0xProject/0x-monorepo/issues" }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/monorepo-scripts/README.md", - "comment": "// We purposefully use an older version of tslint-config here to avoid creating an import cycle", "devDependencies": { "@types/glob": "^5.0.33", "@types/node": "^8.0.53", diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index a5be40014..31c85e3cc 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -75,7 +75,7 @@ const packageNameToWebsitePath: { [name: string]: string } = { async function confirmDocPagesRenderAsync(packages: LernaPackage[]) { // push docs to staging utils.log("Upload all docJson's to S3 staging..."); - await execAsync(`yarn lerna:stage_docs`, { cwd: constants.monorepoRootPath }); + await execAsync(`yarn stage_docs`, { cwd: constants.monorepoRootPath }); // deploy website to staging utils.log('Deploy website to staging...'); diff --git a/packages/order-utils/README.md b/packages/order-utils/README.md index 4b571509a..33df1d4b0 100644 --- a/packages/order-utils/README.md +++ b/packages/order-utils/README.md @@ -40,28 +40,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/order-utils yarn build ``` 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 +PKG=@0xproject/order-utils yarn watch ``` ### Clean diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index cdb5b63b0..5ef0bb97d 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test": "run-s clean build run_mocha", "test:circleci": "yarn test:coverage", diff --git a/packages/order-watcher/README.md b/packages/order-watcher/README.md index d461dca8d..de64a70e7 100644 --- a/packages/order-watcher/README.md +++ b/packages/order-watcher/README.md @@ -48,28 +48,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/order-watcher yarn build ``` 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 +PKG=@0xproject/order-watcher yarn watch ``` ### Clean diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 39162fd1e..0ac9f8592 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -12,7 +12,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "prebuild": "run-s clean generate_contract_wrappers", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'", "lint": "tslint --project .", diff --git a/packages/react-docs-example/README.md b/packages/react-docs-example/README.md index ff821dba8..c7dfcd3aa 100644 --- a/packages/react-docs-example/README.md +++ b/packages/react-docs-example/README.md @@ -25,7 +25,7 @@ yarn install 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 +PKG=0x.js yarn build ``` 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. @@ -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 dev +PKG=0x.js yarn watch ``` ### Deploy Example to S3 bucket @@ -50,8 +50,16 @@ yarn deploy_example ### Build +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0xproject/react-docs-example yarn build +``` + +Or continuously rebuild on change: + ```bash -yarn build +PKG=@0xproject/react-docs-example yarn watch ``` ### Clean diff --git a/packages/react-docs-example/package.json b/packages/react-docs-example/package.json index b6b6c6c7d..1c154d5c8 100644 --- a/packages/react-docs-example/package.json +++ b/packages/react-docs-example/package.json @@ -7,7 +7,7 @@ "lint": "tslint --project .", "build": "tsc", "build:example": "NODE_ENV=production webpack", - "build:watch": "tsc -w", + "watch": "tsc -w", "clean": "shx rm -rf lib; shx rm -f public/bundle*", "dev": "webpack-dev-server --open", "deploy_example": "npm run build:example; aws s3 sync ./public/. s3://react-docs-example --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 5a46b84f0..c0efc4a0b 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -71,28 +71,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/react-docs yarn build ``` 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 +PKG=@0xproject/react-docs yarn watch ``` ### Clean diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index ca9ae610e..94d527d40 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -7,7 +7,7 @@ "scripts": { "lint": "tslint --project .", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "build:watch": "tsc -w", + "watch": "tsc -w", "clean": "shx rm -rf lib scripts", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md index 0b4188180..88e6f18ae 100644 --- a/packages/react-shared/README.md +++ b/packages/react-shared/README.md @@ -38,28 +38,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/react-shared yarn build ``` 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 +PKG=@0xproject/react-shared yarn watch ``` ### Clean diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index b9a46376c..7d3eb186d 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -7,7 +7,7 @@ "scripts": { "lint": "tslint --project .", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "build:watch": "tsc -w", + "watch": "tsc -w", "clean": "shx rm -rf lib scripts", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, diff --git a/packages/sol-compiler/README.md b/packages/sol-compiler/README.md index bb8175952..76d0e9b8b 100644 --- a/packages/sol-compiler/README.md +++ b/packages/sol-compiler/README.md @@ -60,28 +60,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/sol-compiler yarn build ``` 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 +PKG=@0xproject/sol-compiler yarn watch ``` ### Clean diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 19d390c32..fcb0b9cd0 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' ./lib && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test": "run-s build run_mocha", "run_mocha": "mocha lib/test/*_test.js --bail --exit", diff --git a/packages/sol-cov/README.md b/packages/sol-cov/README.md index 3a0377521..0a63ac06e 100644 --- a/packages/sol-cov/README.md +++ b/packages/sol-cov/README.md @@ -44,28 +44,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/sol-cov yarn build ``` 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 +PKG=@0xproject/sol-cov yarn watch ``` ### Clean diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 6268df4c7..ec6207a1b 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "lint": "tslint --project .", "test": "run-s clean build compile_test run_mocha", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/sol-resolver/README.md b/packages/sol-resolver/README.md new file mode 100644 index 000000000..8487947f0 --- /dev/null +++ b/packages/sol-resolver/README.md @@ -0,0 +1,67 @@ +## @0xproject/sol-resolver + +A Solidity import resolver used by [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler). + +## Installation + +```bash +yarn add @0xproject/sol-resolver +``` + +**Import** + +```javascript +import { Resolver } from '@0xproject/sol-resolver'; +``` + +or + +```javascript +var Resolver = require('@0xproject/sol-resolver').Resolver; +``` + +## 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 + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0xproject/sol-resolver yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0xproject/sol-resolver yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json index 6e4ba97e4..1240d0afb 100644 --- a/packages/sol-resolver/package.json +++ b/packages/sol-resolver/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "yarn clean && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", diff --git a/packages/sra-report/README.md b/packages/sra-report/README.md index 806ac3bf4..d8df36a29 100644 --- a/packages/sra-report/README.md +++ b/packages/sra-report/README.md @@ -107,28 +107,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/sra-report yarn build ``` 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 +PKG=@0xproject/sra-report yarn watch ``` ### Clean diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 1fc0d3ade..5f8701997 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -5,7 +5,7 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "clean": "shx rm -rf lib scripts", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "lint": "tslint --project .", diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index 8c8807895..90c9b7bbe 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -42,28 +42,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/subproviders yarn build ``` 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 +PKG=@0xproject/subproviders yarn watch ``` ### Clean diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 92377f118..cf1ed32ec 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -5,7 +5,7 @@ "types": "lib/src/index.d.ts", "license": "Apache-2.0", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "clean": "shx rm -rf lib scripts", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "lint": "tslint --project .", diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md index 93f97e1b7..a92b93fc0 100644 --- a/packages/testnet-faucets/README.md +++ b/packages/testnet-faucets/README.md @@ -28,28 +28,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/testnet-faucets yarn build ``` 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 +PKG=@0xproject/testnet-faucets yarn watch ``` ### Clean @@ -86,7 +74,7 @@ Infura API Key can be requested here: https://infura.io/signup Note: The above public/private keys exist when running `testrpc` with the following option `--mnemonic concert load couple harbor equip island argue ramp clarify fence smart topic`. ```bash -yarn dev +PKG=0x.js yarn watch ``` ### Endpoints diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 48fe77bf4..f00ffad02 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -5,7 +5,7 @@ "description": "A faucet micro-service that dispenses test ERC20 tokens or Ether", "main": "server.js", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "node ../../node_modules/gulp/bin/gulp.js build", "dev": "node ../../node_modules/gulp/bin/gulp.js run", "start": "node ./bin/server.js", diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index d90b3cf73..d630ec84d 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -40,28 +40,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/tslint-config yarn build ``` 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 +PKG=@0xproject/tslint-config yarn watch ``` ### Clean diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index a5b34a35e..04e1ba2b6 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -4,7 +4,7 @@ "description": "Lint rules related to 0xProject for TSLint", "main": "tslint.json", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", diff --git a/packages/types/README.md b/packages/types/README.md index 665701ea4..c091b8302 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -44,28 +44,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/types yarn build ``` 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 +PKG=@0xproject/types yarn watch ``` ### Clean diff --git a/packages/types/package.json b/packages/types/package.json index 973d5b8d0..be735914f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", diff --git a/packages/typescript-typings/README.md b/packages/typescript-typings/README.md index 968b2e87c..439cb6484 100644 --- a/packages/typescript-typings/README.md +++ b/packages/typescript-typings/README.md @@ -40,28 +40,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/typescript-typings yarn build ``` 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 +PKG=@0xproject/typescript-typings yarn watch ``` ### Clean diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index ad865854c..4643c1d81 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -3,6 +3,7 @@ "version": "0.3.1", "description": "0x project typescript type definitions", "scripts": { + "watch": "tsc -w", "build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts", "clean": "shx rm -rf scripts", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" diff --git a/packages/utils/README.md b/packages/utils/README.md index 914404937..c637c9af5 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -44,28 +44,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/utils yarn build ``` 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 +PKG=@0xproject/utils yarn watch ``` ### Clean diff --git a/packages/utils/package.json b/packages/utils/package.json index 0924aefc3..c6906dd71 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build:watch": "tsc -w", + "watch": "tsc -w", "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index d752a9de0..bfa98deff 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -40,28 +40,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/web3-wrapper yarn build ``` 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 +PKG=@0xproject/web3-wrapper yarn watch ``` ### Clean diff --git a/packages/website/README.md b/packages/website/README.md index d93d18935..7115a3b5c 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -30,18 +30,16 @@ 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: +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -yarn lerna:rebuild +PKG=@0xproject/website yarn build ``` ### Run dev server -The the `website` root directory, run: - ```bash -yarn dev +PKG=@0xproject/website yarn watch ``` Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser. diff --git a/packages/website/package.json b/packages/website/package.json index ad84a3eb9..286ceaca8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -7,7 +7,7 @@ "build": "NODE_ENV=production webpack; exit 0;", "clean": "shx rm -f public/bundle*", "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", - "dev": "webpack-dev-server --content-base public --https", + "watch": "webpack-dev-server --content-base public --https", "deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" }, @@ -6,15 +6,6 @@ version "0.3.9" resolved "https://registry.yarnpkg.com/8fold-marked/-/8fold-marked-0.3.9.tgz#bb89c645612f8ccfaffac1ca6e3c11f168c9cf59" -"@0xproject/tslint-config@0.4.13": - version "0.4.13" - resolved "https://registry.yarnpkg.com/@0xproject/tslint-config/-/tslint-config-0.4.13.tgz#98c71c5ae5e80315a23eda0134cc9f6f4438cac2" - dependencies: - lodash "^4.17.4" - tslint "5.8.0" - tslint-eslint-rules "^4.1.1" - tslint-react "^3.2.0" - "@0xproject/types@^0.5.0": version "0.5.0" resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05" @@ -9875,7 +9866,7 @@ split@0.3: dependencies: through "2" -split@^1.0.0: +split@^1.0.0, split@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" dependencies: @@ -10373,6 +10364,10 @@ thenify-all@^1.0.0, thenify-all@^1.6.0: dependencies: any-promise "^1.0.0" +throat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + through2-filter@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" @@ -11784,6 +11779,18 @@ ws@^5.1.1: dependencies: async-limiter "~1.0.0" +wsrun@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/wsrun/-/wsrun-2.2.0.tgz#fe05ca2c466e9281059d255b2773e7964dbcb3a7" + dependencies: + bluebird "^3.5.1" + chalk "^2.3.0" + glob "^7.1.2" + lodash "^4.17.4" + split "^1.0.1" + throat "^4.1.0" + yargs "^10.0.3" + x-is-function@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/x-is-function/-/x-is-function-1.0.4.tgz#5d294dc3d268cbdd062580e0c5df77a391d1fa1e" |