npm-docs
选择命令行版本:
See Details
目录
概要
¥Synopsis
npm docs [<pkgname> [<pkgname> ...]]alias: home
描述
¥Description
此命令尝试猜测包文档 URL 的可能位置,然后尝试使用 --browser
配置 参数打开它。你可以一次传递多个包名称。如果没有提供包名,它将在当前文件夹中搜索 package.json
并使用 name
属性。
¥This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the --browser
config param. You can pass multiple package names at once. If no package name is provided, it will search for a package.json
in the current folder and use the name
property.
配置
¥Configuration
browser
-
默认值:OS X:
"open"
,Windows:"start"
、其他:"xdg-open"
¥Default: OS X:
"open"
, Windows:"start"
, Others:"xdg-open"
-
类型:空值、布尔值或字符串
¥Type: null, Boolean, or String
npm 命令调用以打开网站的浏览器。
¥The browser that is called by npm commands to open websites.
设置为 false
以抑制浏览器行为,而是将 url 打印到终端。
¥Set to false
to suppress browser behavior and instead print urls to terminal.
设置为 true
以使用默认系统 URL 打开器。
¥Set to true
to use default system URL opener.
registry
-
默认值:"https://registry.npmjs.org/"
¥Default: "https://registry.npmjs.org/"
-
类型:URL
¥Type: URL
npm 注册表的基本 URL。
¥The base URL of the npm registry.
workspace
-
默认值:
¥Default:
-
类型:字符串(可以设置多次)
¥Type: String (can be set multiple times)
启用在当前项目的已配置工作区的上下文中运行命令,同时通过仅运行此配置选项定义的工作区进行过滤。
¥Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
workspace
配置的有效值为:
¥Valid values for the workspace
config are either:
-
工作区名称
¥Workspace names
-
工作区目录的路径
¥Path to a workspace directory