Skip to content

Commit

Permalink
Add info about NPM workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehb committed Nov 22, 2024
1 parent 751fcf4 commit c236df7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c236df7

Please sign in to comment.