1. @lerna/project
Lerna project configuration
@lerna/project
Package: @lerna/project
Created by: lerna
Last modified: Thu, 23 Nov 2023 13:20:32 GMT
Version: 6.4.1
License: MIT
Downloads: 2,161,641
Repository: https://github.com/lerna/lerna

Install

npm install @lerna/project
yarn add @lerna/project

@lerna/project

Lerna project configuration

Configuration Resolution

Lerna's file-based configuration is located in lerna.json or the lerna property of package.json.
Wherever this configuration is found is considered the "root" of the lerna-managed multi-package repository.
A minimum-viable configuration only needs a version property; the following examples are equivalent:

 {
  "version": "1.2.3"
}
 {
  "name": "my-monorepo",
  "version": "0.0.0-root",
  "private": true,
  "lerna": {
    "version": "1.2.3"
  }
}

Any other properties on this configuration object will be used as defaults for CLI options of all lerna subcommands. That is to say, CLI options always override values found in configuration files (a standard practice for CLI applications).

Command-Specific Configuration

To focus configuration on a particular subcommand, use the command subtree. Each subproperty of command corresponds to a lerna subcommand (publish, create, run, exec, etc).

 {
  "version": "1.2.3",
  "command": {
    "publish": {
      "loglevel": "verbose"
    }
  },
  "loglevel": "success"
}

In the example above, lerna publish will act as if --loglevel verbose was passed.
All other subcommands will receive the equivalent of --loglevel success (much much quieter).

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code