@0x-lerna-fork/filter-options
需要过滤的lerna 子命令的选项
安装 莱娜 进入 lerna CLI(英语:CLI).
选项
--scope <glob>
只包含名称与给定的 glob 匹配的软件包 .
$ lerna exec --scope my-component -- ls -la
$ lerna run --scope toolbar-* test
$ lerna run --scope package-1 --scope *-2 lint
说明: 对于某些软体,可能有必要引用选项参数来避免过早地外壳扩张.
--ignore <glob>
排除带有匹配给定的 glob 名称的软件包 .
$ lerna exec --ignore package-{1,2,5} -- ls -la
$ lerna run --ignore package-1 test
$ lerna run --ignore package-@(1|2) --ignore package-3 lint
可以找到更多的过滤实例 这里。 。 。 .
--no-private
不包括私人软件包。 它们是默认列入的.
--since [ref]
只包括自指定后更新的软件包 ref。如果没有通过注释,则默认为最近标记.
# List the contents of packages that have changed since the latest tag
$ lerna exec --since -- ls -la
# Run the tests for all packages that have changed since `master`
$ lerna run test --since master
# List all packages that have changed since `some-branch`
$ lerna ls --since some-branch
这在CI中使用时特别有用,如果你可以得到目标分支,一个PR会进入,因为你可以使用它作为 ref 页:1 --since 选项。 这对PR进入主机以及特色分机都非常有效.
--include-filtered-dependents
运行命令时包含所有中转依赖者, 不论是否 --scope, (中文(简体) ), --ignore,或 --since。 。 。 .
--include-filtered-dependencies
运行命令时包含所有过渡性依赖性, 不论是否 --scope, (中文(简体) ), --ignore,或 --since。 。 。 .
与任何接受的命令结合使用 --scope (单位:千美元)bootstrap, (中文(简体) ), clean, (中文(简体) ), ls, (中文(简体) ), run, (中文(简体) ), exec) (中文(简体) ).
确保任何范围化软件包的所有依赖性(以及非依赖性)(要么通过 --scope 或者说 --ignore此外,还进行操作.
说明: 这将覆盖
--scope财务报告和审定财务报表--ignore旗帜.即: 与
--ignore如果旗被另一个正在被拖走的软件包所依赖,则旗子仍将被拖走.
这对于您想要"设置"一个依赖于其它软件包设置的单一软件包的情况有用.
$ lerna bootstrap --scope my-component --include-filtered-dependencies
# my-component and all of its dependencies will be bootstrapped
$ lerna bootstrap --scope "package-*" --ignore "package-util-*" --include-filtered-dependencies
# all packages matching "package-util-*" will be ignored unless they are
# depended upon by a package whose name matches "package-*"