Lerna tips and tricks

Updated on: Sat Aug 07 2021

Here I will collect some useful tips and tricks for Lerna - tool to manage monorepos.

To get run some-command in all your lerna packages. Option --stream is to get all logs right into console.

copied bash

lerna run some-command --stream

To run script in some specific package we can user --scope argument:

copied bash

lerna run build --scope my-package-name

Important thing to mention here is my-package-name is not the name of pacakge's directory on filesystem but it's actual name in package.json.