--scope
This filter limits the command execution scope only to packages that meet the condition. For example:
// starts a package with the name 'server'
lerna run --scope server start
// starts all packages end up on '-server'
lerna run --scope *-server start
// you can select multiple scopes at the same time
// executes either '-server's and '-client's 'start' command
lerna run --scope *-server --scope *-client start
--ignore
This one works as the previous, but in the opposite way. Basically, it excludes everything that matches the pattern or name.
// Runs 'npm audit' everywhere, but in ui-library
lerna exec --ignore ui-library npm audit
// Runs 'npm audit' everywhere, but in dev-server and dev-client packages
lerna exec --ignore dev-{server,client} npm audit
Top comments (0)