1NPM-DOCS(1) NPM-DOCS(1)
2
3
4
6 npm-docs - Open documentation for a package in a web browser
7
8 Synopsis
9 npm docs [<pkgname> [<pkgname> ...]]
10
11 aliases: home
12
13 Description
14 This command tries to guess at the likely location of a package's docu‐
15 mentation URL, and then tries to open it using the --browser config
16 param. You can pass multiple package names at once. If no package name
17 is provided, it will search for a package.json in the current folder
18 and use the name property.
19
20 Configuration
21 <!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> <!-- automatically
22 generated, do not edit manually --> <!-- see lib/utils/config/defini‐
23 tions.js -->
24
25 browser
26 • Default: OS X: "open", Windows: "start", Others: "xdg-open"
27
28 • Type: null, Boolean, or String
29
30
31 The browser that is called by npm commands to open websites.
32
33 Set to false to suppress browser behavior and instead print urls to
34 terminal.
35
36 Set to true to use default system URL opener. <!-- automatically gen‐
37 erated, do not edit manually --> <!-- see lib/utils/config/defini‐
38 tions.js -->
39
40
41 registry
42 • Default: "https://registry.npmjs.org/"
43
44 • Type: URL
45
46
47 The base URL of the npm registry. <!-- automatically generated, do not
48 edit manually --> <!-- see lib/utils/config/definitions.js -->
49
50
51 workspace
52 • Default:
53
54 • Type: String (can be set multiple times)
55
56
57 Enable running a command in the context of the configured workspaces of
58 the current project while filtering by running only the workspaces de‐
59 fined by this configuration option.
60
61 Valid values for the workspace config are either:
62
63 • Workspace names
64
65 • Path to a workspace directory
66
67 • Path to a parent workspace directory (will result to selecting all of
68 the nested workspaces)
69
70
71 When set for the npm init command, this may be set to the folder of a
72 workspace which does not yet exist, to create the folder and set it up
73 as a brand new workspace within the project.
74
75 This value is not exported to the environment for child processes.
76 <!-- automatically generated, do not edit manually --> <!-- see
77 lib/utils/config/definitions.js -->
78
79
80 workspaces
81 • Default: false
82
83 • Type: Boolean
84
85
86 Enable running a command in the context of all the configured
87 workspaces.
88
89 This value is not exported to the environment for child processes.
90 <!-- automatically generated, do not edit manually --> <!-- see
91 lib/utils/config/definitions.js -->
92
93 <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
94
95
96 See Also
97 • npm help view
98
99 • npm help publish
100
101 • npm help registry
102
103 • npm help config
104
105 • npm help npmrc
106
107 • npm help package.json
108
109
110
111
112 October 2021 NPM-DOCS(1)