npm-pack.1 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. .TH "NPM\-PACK" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-pack\fR \- Create a tarball from a package
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm pack [[<@scope>/]<pkg>\.\.\.] [\-\-dry\-run] [\-\-json]
  9. .fi
  10. .RE
  11. .SS Configuration
  12. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  13. <!\-\- automatically generated, do not edit manually \-\->
  14. <!\-\- see lib/utils/config/definitions\.js \-\->
  15. .SS \fBdry\-run\fP
  16. .RS 0
  17. .IP \(bu 2
  18. Default: false
  19. .IP \(bu 2
  20. Type: Boolean
  21. .RE
  22. .P
  23. Indicates that you don't want npm to make any changes and that it should
  24. only report what it would have done\. This can be passed into any of the
  25. commands that modify your local installation, eg, \fBinstall\fP, \fBupdate\fP,
  26. \fBdedupe\fP, \fBuninstall\fP, as well as \fBpack\fP and \fBpublish\fP\|\.
  27. .P
  28. Note: This is NOT honored by other network related commands, eg \fBdist\-tags\fP,
  29. \fBowner\fP, etc\.
  30. <!\-\- automatically generated, do not edit manually \-\->
  31. <!\-\- see lib/utils/config/definitions\.js \-\->
  32. .SS \fBjson\fP
  33. .RS 0
  34. .IP \(bu 2
  35. Default: false
  36. .IP \(bu 2
  37. Type: Boolean
  38. .RE
  39. .P
  40. Whether or not to output JSON data, rather than the normal output\.
  41. .RS 0
  42. .IP \(bu 2
  43. In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
  44. saving them to your \fBpackage\.json\fP\|\.
  45. .RE
  46. .P
  47. Not supported by all npm commands\.
  48. <!\-\- automatically generated, do not edit manually \-\->
  49. <!\-\- see lib/utils/config/definitions\.js \-\->
  50. .SS \fBpack\-destination\fP
  51. .RS 0
  52. .IP \(bu 2
  53. Default: "\."
  54. .IP \(bu 2
  55. Type: String
  56. .RE
  57. .P
  58. Directory in which \fBnpm pack\fP will save tarballs\.
  59. <!\-\- automatically generated, do not edit manually \-\->
  60. <!\-\- see lib/utils/config/definitions\.js \-\->
  61. .SS \fBworkspace\fP
  62. .RS 0
  63. .IP \(bu 2
  64. Default:
  65. .IP \(bu 2
  66. Type: String (can be set multiple times)
  67. .RE
  68. .P
  69. Enable running a command in the context of the configured workspaces of the
  70. current project while filtering by running only the workspaces defined by
  71. this configuration option\.
  72. .P
  73. Valid values for the \fBworkspace\fP config are either:
  74. .RS 0
  75. .IP \(bu 2
  76. Workspace names
  77. .IP \(bu 2
  78. Path to a workspace directory
  79. .IP \(bu 2
  80. Path to a parent workspace directory (will result in selecting all
  81. workspaces within that folder)
  82. .RE
  83. .P
  84. When set for the \fBnpm init\fP command, this may be set to the folder of a
  85. workspace which does not yet exist, to create the folder and set it up as a
  86. brand new workspace within the project\.
  87. .P
  88. This value is not exported to the environment for child processes\.
  89. <!\-\- automatically generated, do not edit manually \-\->
  90. <!\-\- see lib/utils/config/definitions\.js \-\->
  91. .SS \fBworkspaces\fP
  92. .RS 0
  93. .IP \(bu 2
  94. Default: null
  95. .IP \(bu 2
  96. Type: null or Boolean
  97. .RE
  98. .P
  99. Set to true to run the command in the context of \fBall\fR configured
  100. workspaces\.
  101. .P
  102. Explicitly setting this to false will cause commands like \fBinstall\fP to
  103. ignore workspaces altogether\. When not set explicitly:
  104. .RS 0
  105. .IP \(bu 2
  106. Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
  107. will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
  108. other things (test, exec, publish, etc\.) will operate on the root project,
  109. \fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
  110. .RE
  111. .P
  112. This value is not exported to the environment for child processes\.
  113. <!\-\- automatically generated, do not edit manually \-\->
  114. <!\-\- see lib/utils/config/definitions\.js \-\->
  115. .SS \fBinclude\-workspace\-root\fP
  116. .RS 0
  117. .IP \(bu 2
  118. Default: false
  119. .IP \(bu 2
  120. Type: Boolean
  121. .RE
  122. .P
  123. Include the workspace root when workspaces are enabled for a command\.
  124. .P
  125. When false, specifying individual workspaces via the \fBworkspace\fP config, or
  126. all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
  127. the specified workspaces, and not on the root project\.
  128. <!\-\- automatically generated, do not edit manually \-\->
  129. <!\-\- see lib/utils/config/definitions\.js \-\->
  130. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  131. .SS Description
  132. .P
  133. For anything that's installable (that is, a package folder, tarball,
  134. tarball url, git url, name@tag, name@version, name, or scoped name), this
  135. command will fetch it to the cache, copy the tarball to the current working
  136. directory as \fB<name>\-<version>\.tgz\fP, and then write the filenames out to
  137. stdout\.
  138. .P
  139. If the same package is specified multiple times, then the file will be
  140. overwritten the second time\.
  141. .P
  142. If no arguments are supplied, then npm packs the current package folder\.
  143. .SS See Also
  144. .RS 0
  145. .IP \(bu 2
  146. npm\-packlist package \fIhttp://npm\.im/npm\-packlist\fR
  147. .IP \(bu 2
  148. npm help cache
  149. .IP \(bu 2
  150. npm help publish
  151. .IP \(bu 2
  152. npm help config
  153. .IP \(bu 2
  154. npm help npmrc
  155. .RE