aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-15 17:41:51 +0800
committerGitHub <noreply@github.com>2018-05-15 17:41:51 +0800
commit406e91d387f67b0eda48e9ab682814c8feffb5e1 (patch)
tree90e047171c2326d5a8c39164945c768858ca3302 /packages/monorepo-scripts
parentca08dd9705c2aefb092b10926af359ed8fabac79 (diff)
parent473acafd1457a381405335dae80a3a8e810af17b (diff)
downloaddexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar.gz
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar.bz2
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar.lz
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar.xz
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.tar.zst
dexon-sol-tools-406e91d387f67b0eda48e9ab682814c8feffb5e1.zip
Merge pull request #588 from 0xProject/improvement/use-wsrun
Individual package building & watching!!! 💪 🌹
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/README.md20
-rw-r--r--packages/monorepo-scripts/package.json3
-rw-r--r--packages/monorepo-scripts/src/publish.ts2
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 9fa0230c8..5c26475c9 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[]): Promise<void> {
// 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...');