lerna run <script>

Run an npm script in each package that contains that script

Arguments

NameDescription
scriptName of the npm script to run

Options

NameDescription
--concurrencyHow many threads to use when Lerna parallelizes the tasks (defaults to count of logical CPU cores)
--loglevel <loglevel>What level of logs to report. On failure, all logs are written to lerna-debug.log in the current working directory
--max-buffer <bytes>Set a max buffer length for each underlying process call
--no-progressDisable progress bars. This is always the case in a CI environment
--no-sortThe --no-sort option disables sorting, instead executing tasks in an arbitrary order with maximum concurrency
--reject-cyclesFail immediately if a cycle is found (in bootstrap, exec, publish or run)
-h, --helpShow help
-v, --versionShow version number
--scope <glob>Include only packages with names matching the given glob
--ignore <glob>Exclude packages with names matching the given glob
--no-privateExclude private packages. They are included by default
--since [ref]Only include packages that have been changed since the specified ref. If no ref is passed, it defaults to the most-recent tag
--exclude-dependentsExclude all transitive dependents when running a command with --since, overriding the default 'changed' algorithm
--include-dependentsExclude all transitive dependents when running a command with --since, overriding the default 'changed' algorithm
--include-dependenciesInclude all transitive dependencies when running a command regardless of --scope, --ignore, or --since
--include-merged-tagsInclude tags from merged branches when running a command with --since. This is only useful if you do a lot of publishing from feature branches, which is not generally recommended
--streamStream output from child processes immediately, prefixed with the originating package name. This allows output from different packages to be interleaved
--parallelSimilar to --stream, but completely disregards concurrency and topological sorting, running a given command or script immediately in all matching packages with prefixed streaming output
--no-bailBy default, lerna run will exit with an error if any script run returns a non-zero exit code. Pass --no-bail to disable this behavior, running the script in all packages that contain it regardless of exit code
--no-prefixDisable package name prefixing when output is streaming (--stream or --parallel). This option can be useful when piping results to other processes, such as editor plugins
--profileProfiles the script executions and produces a performance profile which can be analyzed using DevTools
--profile-location <location>You can provide a custom location for the performance profile output. The path provided will be resolved relative to the current working directory