npm-docs.1 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. .TH "NPM\-DOCS" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-docs\fR \- Open documentation for a package in a web browser
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm docs [<pkgname> [<pkgname> \.\.\.]]
  9. aliases: home
  10. .fi
  11. .RE
  12. .SS Description
  13. .P
  14. This command tries to guess at the likely location of a package's
  15. documentation URL, and then tries to open it using the \fB\-\-browser\fP config
  16. param\. You can pass multiple package names at once\. If no package name is
  17. provided, it will search for a \fBpackage\.json\fP in the current folder and use
  18. the \fBname\fP property\.
  19. .SS Configuration
  20. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  21. <!\-\- automatically generated, do not edit manually \-\->
  22. <!\-\- see lib/utils/config/definitions\.js \-\->
  23. .SS \fBbrowser\fP
  24. .RS 0
  25. .IP \(bu 2
  26. Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP
  27. .IP \(bu 2
  28. Type: null, Boolean, or String
  29. .RE
  30. .P
  31. The browser that is called by npm commands to open websites\.
  32. .P
  33. Set to \fBfalse\fP to suppress browser behavior and instead print urls to
  34. terminal\.
  35. .P
  36. Set to \fBtrue\fP to use default system URL opener\.
  37. <!\-\- automatically generated, do not edit manually \-\->
  38. <!\-\- see lib/utils/config/definitions\.js \-\->
  39. .SS \fBregistry\fP
  40. .RS 0
  41. .IP \(bu 2
  42. Default: "https://registry\.npmjs\.org/"
  43. .IP \(bu 2
  44. Type: URL
  45. .RE
  46. .P
  47. The base URL of the npm registry\.
  48. <!\-\- automatically generated, do not edit manually \-\->
  49. <!\-\- see lib/utils/config/definitions\.js \-\->
  50. .SS \fBworkspace\fP
  51. .RS 0
  52. .IP \(bu 2
  53. Default:
  54. .IP \(bu 2
  55. Type: String (can be set multiple times)
  56. .RE
  57. .P
  58. Enable running a command in the context of the configured workspaces of the
  59. current project while filtering by running only the workspaces defined by
  60. this configuration option\.
  61. .P
  62. Valid values for the \fBworkspace\fP config are either:
  63. .RS 0
  64. .IP \(bu 2
  65. Workspace names
  66. .IP \(bu 2
  67. Path to a workspace directory
  68. .IP \(bu 2
  69. Path to a parent workspace directory (will result in selecting all
  70. workspaces within that folder)
  71. .RE
  72. .P
  73. When set for the \fBnpm init\fP command, this may be set to the folder of a
  74. workspace which does not yet exist, to create the folder and set it up as a
  75. brand new workspace within the project\.
  76. .P
  77. This value is not exported to the environment for child processes\.
  78. <!\-\- automatically generated, do not edit manually \-\->
  79. <!\-\- see lib/utils/config/definitions\.js \-\->
  80. .SS \fBworkspaces\fP
  81. .RS 0
  82. .IP \(bu 2
  83. Default: null
  84. .IP \(bu 2
  85. Type: null or Boolean
  86. .RE
  87. .P
  88. Set to true to run the command in the context of \fBall\fR configured
  89. workspaces\.
  90. .P
  91. Explicitly setting this to false will cause commands like \fBinstall\fP to
  92. ignore workspaces altogether\. When not set explicitly:
  93. .RS 0
  94. .IP \(bu 2
  95. Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
  96. will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
  97. other things (test, exec, publish, etc\.) will operate on the root project,
  98. \fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
  99. .RE
  100. .P
  101. This value is not exported to the environment for child processes\.
  102. <!\-\- automatically generated, do not edit manually \-\->
  103. <!\-\- see lib/utils/config/definitions\.js \-\->
  104. .SS \fBinclude\-workspace\-root\fP
  105. .RS 0
  106. .IP \(bu 2
  107. Default: false
  108. .IP \(bu 2
  109. Type: Boolean
  110. .RE
  111. .P
  112. Include the workspace root when workspaces are enabled for a command\.
  113. .P
  114. When false, specifying individual workspaces via the \fBworkspace\fP config, or
  115. all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
  116. the specified workspaces, and not on the root project\.
  117. <!\-\- automatically generated, do not edit manually \-\->
  118. <!\-\- see lib/utils/config/definitions\.js \-\->
  119. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  120. .SS See Also
  121. .RS 0
  122. .IP \(bu 2
  123. npm help view
  124. .IP \(bu 2
  125. npm help publish
  126. .IP \(bu 2
  127. npm help registry
  128. .IP \(bu 2
  129. npm help config
  130. .IP \(bu 2
  131. npm help npmrc
  132. .IP \(bu 2
  133. npm help package\.json
  134. .RE