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 in selecting all
68 workspaces within that folder)
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: null
82
83 • Type: null or Boolean
84
85
86 Set to true to run the command in the context of all configured
87 workspaces.
88
89 Explicitly setting this to false will cause commands like install to
90 ignore workspaces altogether. When not set explicitly:
91
92 • Commands that operate on the node_modules tree (install, update,
93 etc.) will link workspaces into the node_modules folder. - Commands
94 that do other things (test, exec, publish, etc.) will operate on the
95 root project, unless one or more workspaces are specified in the
96 workspace config.
97
98
99 This value is not exported to the environment for child processes.
100 <!-- automatically generated, do not edit manually --> <!-- see
101 lib/utils/config/definitions.js -->
102
103
104 include-workspace-root
105 • Default: false
106
107 • Type: Boolean
108
109
110 Include the workspace root when workspaces are enabled for a command.
111
112 When false, specifying individual workspaces via the workspace config,
113 or all workspaces via the workspaces flag, will cause npm to operate
114 only on the specified workspaces, and not on the root project. <!--
115 automatically generated, do not edit manually --> <!-- see
116 lib/utils/config/definitions.js -->
117
118 <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
119
120
121 See Also
122 • npm help view
123
124 • npm help publish
125
126 • npm help registry
127
128 • npm help config
129
130 • npm help npmrc
131
132 • npm help package.json
133
134
135
136
137 January 2022 NPM-DOCS(1)