From f4b284adc850a278a2f3af4be142b58120ac0883 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Thu, 26 Aug 2021 00:04:58 -0400 Subject: [PATCH] doc: added pnpm command --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index fb35899..c8103fe 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,18 @@ The monorepo management tool [`lerna`](https://github.com/lerna/lerna) can be us ```bash lerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo +``` + +### With pnpm +[pnpm](https://pnpm.io/) has built-in [workspace](https://pnpm.io/workspaces) functionality for monorepos. Similarly to the above, you can use pnpm to make release in all packages: + +```bash +pnpm -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo ``` Thanks to how [`npx's package resolution works`](https://github.com/npm/npx#description), if the repository root is in `$PATH` (typically true on CI), `semantic-release` and `semantic-release-monorepo` can be installed once in the repo root instead of in each individual package, likely saving both time and disk space. + ## Advanced This library modifies the `context` object passed to `semantic-release` plugins in the following way to make them compatible with a monorepo.