pnpm -r, --recursive
별칭: m, multi, recursive, <command> -r
다음 명령과 함께 사용할 때 작업 공간의 모든 프로젝트에서 명령을 실행합니다.
installlistoutdatedpublishpackrebuildremoveunlinkupdatewhy
다음 명령과 함께 사용되는 경우 루트 프로젝트 를 제외하고 워크스페이스의 모든 프로젝트에서 명령을 실행합니다.
execruntestadd
스크립트를 실행할 때도 루트 프로젝트를 포함하려면 includeWorkspaceRoot 설정을 true로 지정하세요.
사용 예:
pnpm -r publish
By default, recursive run, exec, and test execute projects in
topological order: dependencies run before their dependents. Use --no-sort
to disable graph ordering, or --parallel to start tasks without waiting for
dependencies.
옵션#
--link-workspace-packages#
- 기본값: false
- 유형: true, false, deep
모노레포 워크스페이스에서 로컬로 사용 가능한 패키지를 레지스트리에서 다시 다운로드하는 대신 node_modules에 링크합니다. 이는 yarn workspaces와 유사한 기능을 모방합니다.
이것이 deep으로 설정되면 로컬 패키지도 하위 의존성에 링크될 수 있습니다.
모든 환경에서 동일한 동작을 적용하려면 대신 pnpm-workspace.yaml에서 이 설정을 사용하는 것을 권장합니다. 이 옵션은 단독으로 존재하므로 필요한 경우 이를 오버라이드할 수 있습니다.
--workspace-concurrency#
- Default: the smaller of 4 and the number of available CPU cores
- 유형: Number
동시에 실행할 최대 작업 수를 설정합니다. 무제한 동시성을 사용하려면 Infinity를 사용하세요.
In a container with a CPU quota, such as a Kubernetes CPU limit, the quota is the number of available CPU cores when it is smaller than the number of CPUs the container may run on. A fractional quota is rounded down, to at least 1.
You can set the workspace-concurrency as <= 0 and it will use the number of available CPU cores as: max(1, (number of available CPU cores) - abs(workspace-concurrency))
--[no-]bail#
- 기본값: true
- 유형: Boolean
true인 경우, 작업에 오류가 발생하면 중지됩니다.
With --no-bail, tasks that depend on a failed task are skipped and independent tasks keep running.
This config does not affect the exit code: if any task fails, the command exits with a non-zero code.
See --no-bail.
예제 (모든 패키지에서 테스트 실행, 테스트가 이 중 하나에서 실패하는 경우 계속됨):
pnpm -r --no-bail test
--[no-]sort#
- 기본값: true
- 유형: Boolean
When true, commands follow the workspace dependency graph. Recursive run
also applies relationships from the tasks setting. Pass --no-sort to
remove graph ordering. This also makes tasks, --reverse, and --resume-from
inapplicable.
예시:
pnpm -r --no-sort test
--reverse#
- 기본값: false
- 유형: boolean
When true, dependency edges are reversed. For recursive run, this reverses
the resolved task graph, including relationships declared with dependsOn.
pnpm -r --reverse run clean