diff --git a/README.md b/README.md index c75682a..5154bad 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1248 TILs and counting..._ +_1249 TILs and counting..._ --- @@ -557,6 +557,7 @@ _1248 TILs and counting..._ ### pnpm - [Execute A Command From The Workspace Root](pnpm/execute-a-command-from-the-workspace-root.md) +- [Install Command Runs For Entire Workspace](pnpm/install-command-runs-for-entire-workspace.md) ### PostgreSQL diff --git a/pnpm/install-command-runs-for-entire-workspace.md b/pnpm/install-command-runs-for-entire-workspace.md new file mode 100644 index 0000000..8368ded --- /dev/null +++ b/pnpm/install-command-runs-for-entire-workspace.md @@ -0,0 +1,13 @@ +# Install Command Runs For Entire Workspace + +When you run [`pnpm install`](https://pnpm.io/cli/install) in a monorepo, it +will run from the context of the workspace root. That means it will install +dependencies for your entire monorepo across apps and packages. + +Even if you are in a subdirectory for a specific project with its own +`package.json`, running `pnpm install` will install dependencies for the entire +workspace. + +If you want to install dependencies only for a specific project or a subset of +projects, you can use [the `--filter` +flag](https://pnpm.io/cli/install#--filter-package_selector).