npm-ls
选择命令行版本:
See Details
目录
概要
¥Synopsis
npm ls <package-spec>alias: list
描述
¥Description
此命令将以树形结构打印到标准输出中已安装的包的所有版本,以及指定 --all 时它们的依赖。
¥This command will print to stdout all the versions of packages that are installed, as well as their dependencies when --all is specified, in a tree structure.
注意:要获得一个给定包为何包含在树中的 "一饮而尽" 视图,请使用 npm explain。
¥Note: to get a "bottoms up" view of why a given package is included in the tree at all, use npm explain.
位置参数是 name@version-range 标识符,它将结果限制为仅指定包的路径。请注意,嵌套包还将显示指定包的路径。例如,在 npm 的源代码树中运行 npm ls promzard 将显示:
¥Positional arguments are name@version-range identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:
npm@9.9.4 /path/to/npm└─┬ init-package-json@0.0.4└── promzard@0.1.5