pnpm -r, --recursive
Aliases: m
, multi
, recursive
, <command> -r
Esegue un comando in ogni progetto di uno spazio di lavoro, quando utilizzato con i seguenti comandi:
install
list
outdated
publish
rebuild
remove
unlink
update
why
Esegue un comando in ogni progetto di uno spazio di lavoro, escludendo il progetto nella root, quando utilizzato con i seguenti comandi:
exec
run
test
add
If you want the root project be included even when running scripts, set the includeWorkspaceRoot setting to true
.
Esempio di utilizzo:
pnpm -r publish
Opzioni
--link-workspace-packages
- Default: false
- Type: true, false, deep
Link locally available packages in workspaces of a monorepo into node_modules
instead of re-downloading them from the registry. This emulates functionality
similar to yarn workspaces
.
Quando è impostato su deep, i pacchetti locali possono anche essere collegati alle dipendenze secondarie.
Be advised that it is encouraged instead to use pnpm-workspace.yaml
for this setting, to
enforce the same behaviour in all environments. Questa opzione esiste esclusivamente in modo che tu possa sovrascriverla se necessario.
--workspace-concurrency
- Default: 4
- Type: Number
Imposta il numero massimo di attività da eseguire contemporaneamente. For unlimited concurrency
use Infinity
.
You can set the workspace-concurrency
as <= 0
and it will use amount of cores of the host as: max(1, (number of cores) - abs(workspace-concurrency))
--[no-]bail
- Default: true
- Type: Boolean
Se true, si interrompe quando un'attività genera un errore.
Questa configurazione non influisce sul codice di uscita.
Even if --no-bail
is used, all tasks will finish but if any of the tasks fail,
the command will exit with a non-zero code.
Esempio (esegui test in ogni pacchetto, continua se i test falliscono in uno di essi):
pnpm -r --no-bail test
--[no-]sort
- Default: true
- Type: Boolean
When true
, packages are sorted topologically (dependencies before dependents).
Pass --no-sort
to disable.
Esempio:
pnpm -r --no-sort test
--reverse
- Default: false
- Type: boolean
When true
, the order of packages is reversed.
pnpm -r --reverse run clean