diff --git a/README.md b/README.md index f30d2239..80d98c2a 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,22 @@ To **build** and **run** everything you need to connect to the Pixel Streaming p ./SignallingWebServer/platform_scripts/bash/start.sh ``` +If you want to work on a specific library within this monorepo then `cd` into that directory and run: + +`npm install` +`npm run build-all` + +If you want to install all the dependencies and flush any existing `node_modules`, go to the root of the repo and run: + +`npm install` + +This works because this monorepo is using [NPM workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces?v=true). Using NPM workspaces means: + +- Each sub-workspace within the monorepo does not have its own `package-lock.json`. There is only a single one in the root. +- Common dependencies are hoisted into the root `node_modules` directory. +- Some sub-workspaces will not have a `node_modules` directory because all their dependencies exist in the root `node_modules`. +- When working locally within the monorepo dependencies on sub-workspaces will first try to use a local `symlink` to those dependencies instead of downloading the published packages from NPM. For example, `pixelstreaming-frontend` depends on `pixelstreaming-common`, when working in this repo that dependency will first be attempted to be resolved using the local `./Common` directory. + ## Goals The goals of this repository are to: