LinuxCommandLibrary

lerna

manages JavaScript monorepos

TLDR

Initialize monorepo

$ lerna init
copy
Bootstrap packages
$ lerna bootstrap
copy
Run script in all packages
$ lerna run [build]
copy
Run in specific package
$ lerna run [build] --scope=[package-name]
copy
Publish packages
$ lerna publish
copy
List packages
$ lerna list
copy
Version packages
$ lerna version
copy

SYNOPSIS

lerna command [options]

DESCRIPTION

Lerna manages JavaScript monorepos. It handles multiple packages in a single repository.
The tool coordinates versioning and publishing. It links local dependencies and runs scripts across packages.

PARAMETERS

init

Initialize monorepo.
bootstrap
Install dependencies.
run SCRIPT
Run npm script.
publish
Publish packages.
version
Bump versions.
list
List packages.
--scope PKG
Target specific package.
--help
Display help information.

CAVEATS

Consider npm/yarn workspaces. Nx for advanced features. Node.js required.

HISTORY

Lerna was created by Sebastian McKenzie (Babel author) for managing monorepos, now maintained by Nx.

SEE ALSO

npm(1), yarn(1), nx(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community