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 /packages/monorepo-scripts | |
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
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/README.md | 20 | ||||
-rw-r--r-- | packages/monorepo-scripts/package.json | 3 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 2 |
3 files changed, 6 insertions, 19 deletions
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...'); |