npm-fund.1 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. .TH "NPM\-FUND" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-fund\fR \- Retrieve funding information
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm fund [<pkg>]
  9. npm fund [\-w <workspace\-name>]
  10. .fi
  11. .RE
  12. .SS Description
  13. .P
  14. This command retrieves information on how to fund the dependencies of a
  15. given project\. If no package name is provided, it will list all
  16. dependencies that are looking for funding in a tree structure, listing the
  17. type of funding and the url to visit\. If a package name is provided then it
  18. tries to open its funding url using the \fB\-\-browser\fP config param; if there
  19. are multiple funding sources for the package, the user will be instructed
  20. to pass the \fB\-\-which\fP option to disambiguate\.
  21. .P
  22. The list will avoid duplicated entries and will stack all packages that
  23. share the same url as a single entry\. Thus, the list does not have the same
  24. shape of the output from \fBnpm ls\fP\|\.
  25. .SS Example
  26. .SS Workspaces support
  27. .P
  28. It's possible to filter the results to only include a single workspace and its
  29. dependencies using the \fBworkspace\fP config option\.
  30. .SS Example:
  31. .P
  32. Here's an example running \fBnpm fund\fP in a project with a configured
  33. workspace \fBa\fP:
  34. .P
  35. .RS 2
  36. .nf
  37. $ npm fund
  38. test\-workspaces\-fund@1\.0\.0
  39. +\-\- https://example\.com/a
  40. | | `\-\- a@1\.0\.0
  41. | `\-\- https://example\.com/maintainer
  42. | `\-\- foo@1\.0\.0
  43. +\-\- https://example\.com/npmcli\-funding
  44. | `\-\- @npmcli/test\-funding
  45. `\-\- https://example\.com/org
  46. `\-\- bar@2\.0\.0
  47. .fi
  48. .RE
  49. .P
  50. And here is an example of the expected result when filtering only by
  51. a specific workspace \fBa\fP in the same project:
  52. .P
  53. .RS 2
  54. .nf
  55. $ npm fund \-w a
  56. test\-workspaces\-fund@1\.0\.0
  57. `\-\- https://example\.com/a
  58. | `\-\- a@1\.0\.0
  59. `\-\- https://example\.com/maintainer
  60. `\-\- foo@2\.0\.0
  61. .fi
  62. .RE
  63. .SS Configuration
  64. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  65. <!\-\- automatically generated, do not edit manually \-\->
  66. <!\-\- see lib/utils/config/definitions\.js \-\->
  67. .SS \fBjson\fP
  68. .RS 0
  69. .IP \(bu 2
  70. Default: false
  71. .IP \(bu 2
  72. Type: Boolean
  73. .RE
  74. .P
  75. Whether or not to output JSON data, rather than the normal output\.
  76. .RS 0
  77. .IP \(bu 2
  78. In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
  79. saving them to your \fBpackage\.json\fP\|\.
  80. .RE
  81. .P
  82. Not supported by all npm commands\.
  83. <!\-\- automatically generated, do not edit manually \-\->
  84. <!\-\- see lib/utils/config/definitions\.js \-\->
  85. .SS \fBbrowser\fP
  86. .RS 0
  87. .IP \(bu 2
  88. Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP
  89. .IP \(bu 2
  90. Type: null, Boolean, or String
  91. .RE
  92. .P
  93. The browser that is called by npm commands to open websites\.
  94. .P
  95. Set to \fBfalse\fP to suppress browser behavior and instead print urls to
  96. terminal\.
  97. .P
  98. Set to \fBtrue\fP to use default system URL opener\.
  99. <!\-\- automatically generated, do not edit manually \-\->
  100. <!\-\- see lib/utils/config/definitions\.js \-\->
  101. .SS \fBunicode\fP
  102. .RS 0
  103. .IP \(bu 2
  104. Default: false on windows, true on mac/unix systems with a unicode locale,
  105. as defined by the \fBLC_ALL\fP, \fBLC_CTYPE\fP, or \fBLANG\fP environment variables\.
  106. .IP \(bu 2
  107. Type: Boolean
  108. .RE
  109. .P
  110. When set to true, npm uses unicode characters in the tree output\. When
  111. false, it uses ascii characters instead of unicode glyphs\.
  112. <!\-\- automatically generated, do not edit manually \-\->
  113. <!\-\- see lib/utils/config/definitions\.js \-\->
  114. .SS \fBworkspace\fP
  115. .RS 0
  116. .IP \(bu 2
  117. Default:
  118. .IP \(bu 2
  119. Type: String (can be set multiple times)
  120. .RE
  121. .P
  122. Enable running a command in the context of the configured workspaces of the
  123. current project while filtering by running only the workspaces defined by
  124. this configuration option\.
  125. .P
  126. Valid values for the \fBworkspace\fP config are either:
  127. .RS 0
  128. .IP \(bu 2
  129. Workspace names
  130. .IP \(bu 2
  131. Path to a workspace directory
  132. .IP \(bu 2
  133. Path to a parent workspace directory (will result in selecting all
  134. workspaces within that folder)
  135. .RE
  136. .P
  137. When set for the \fBnpm init\fP command, this may be set to the folder of a
  138. workspace which does not yet exist, to create the folder and set it up as a
  139. brand new workspace within the project\.
  140. .P
  141. This value is not exported to the environment for child processes\.
  142. <!\-\- automatically generated, do not edit manually \-\->
  143. <!\-\- see lib/utils/config/definitions\.js \-\->
  144. .SS \fBwhich\fP
  145. .RS 0
  146. .IP \(bu 2
  147. Default: null
  148. .IP \(bu 2
  149. Type: null or Number
  150. .RE
  151. .P
  152. If there are multiple funding sources, which 1\-indexed source URL to open\.
  153. <!\-\- automatically generated, do not edit manually \-\->
  154. <!\-\- see lib/utils/config/definitions\.js \-\->
  155. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  156. .SH See Also
  157. .RS 0
  158. .IP \(bu 2
  159. npm help install
  160. .IP \(bu 2
  161. npm help docs
  162. .IP \(bu 2
  163. npm help ls
  164. .IP \(bu 2
  165. npm help config
  166. .IP \(bu 2
  167. npm help workspaces
  168. .RE