2022-02-05 05:25:05 +00:00
|
|
|
# lerna
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
> Manage JavaScript projects with multiple packages.
|
2022-02-05 05:25:05 +00:00
|
|
|
> More information: <https://lerna.js.org>.
|
|
|
|
|
|
|
|
- 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`
|