HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

lerna — Manage JavaScript projects with multiple packages. More information: <https://lerna.js.org/docs/api-

Submitted by: @import:tldr-pages··
0
Viewed 0 times
lernacommandmultiplejavascriptclimanageprojectswith

Problem

How to use the lerna command: Manage JavaScript projects with multiple packages. More information: <https://lerna.js.org/docs/api-reference/commands>.

Solution

lerna — Manage JavaScript projects with multiple packages. More information: <https://lerna.js.org/docs/api-reference/commands>.

Initialize project files (lerna.json, package.json, .git, etc.):
lerna init


Install all external dependencies of each package and symlink together local dependencies:
lerna bootstrap


Run a specific script for every package that contains it in its package.json:
lerna run {{script}}


Execute an arbitrary shell command in every package:
lerna exec -- {{ls}}


Publish all packages that have changed since the last release:
lerna publish

Code Snippets

Initialize project files (`lerna.json`, `package.json`, `.git`, etc.)

lerna init

Install all external dependencies of each package and symlink together local dependencies

lerna bootstrap

Run a specific script for every package that contains it in its `package.json`

lerna run {{script}}

Execute an arbitrary shell command in every package

lerna exec -- {{ls}}

Publish all packages that have changed since the last release

lerna publish

Context

tldr-pages: common/lerna

Revisions (0)

No revisions yet.