lerna list / lerna ls
lerna list 默认仅列出所有 Public Package(即缺省了 --no-private),如果需要列出所有 Package,需要添加 --all 选项。
用法
$ lerna listList local packagesCommand Options:--json Show information as a JSON array [boolean]--ndjson Show information as newline-delimited JSON [boolean]-a, --all Show private packages that are normally hidden [boolean]-l, --long Show extended information [boolean]-p, --parseable Show parseable output instead of columnified view [boolean]--toposort Sort packages in topological order instead of lexical by directory [boolean]--graph Show dependency graph as a JSON-formatted adjacency list [boolean]Filter Options:--scope Include only packages with names matching the given glob. [string]--ignore Exclude packages with names matching the given glob. [string]--no-private Exclude packages with { "private": true } in their package.json. [boolean]--since Only include packages that have been changed since the specified [ref].If no ref is passed, it defaults to the most-recent tag. [string]--exclude-dependents Exclude all transitive dependents when running a commandwith --since, overriding the default "changed" algorithm. [boolean]--include-dependents Include all transitive dependents when running a commandregardless of --scope, --ignore, or --since. [boolean]--include-dependencies Include all transitive dependencies when running a commandregardless of --scope, --ignore, or --since. [boolean]--include-merged-tags Include tags from merged branches when running a command with --since. [boolean]Global Options:--loglevel What level of logs to report. [string] [default: info]--concurrency How many processes to use when lerna parallelizes tasks. [number] [default: 4]--reject-cycles Fail if a cycle is detected among dependencies. [boolean]--no-progress Disable progress bars. (Always off in CI) [boolean]--no-sort Do not sort packages topologically (dependencies before dependents). [boolean]--max-buffer Set max-buffer (in bytes) for subcommand execution [number]-h, --help Show help [boolean]-v, --version Show version number
选项
| 选项 | 描述 |
|---|---|
--all |
列出所有 Package,包括 Private Package |
--no-private |
排除 Private Package,即排除 package.json 中包含 {"private": true} 的 Package 。该选项为默认缺省的选项。 |
简写
| 命令 | 描述 |
|---|---|
lerna ls |
同 lerna list |
lerna la |
同 lerna list -la / lerna list --list --all,即列出 Package 的名称、版本,以及 PRIVATE |
