123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- .TH "NPM\-PACK" "1" "October 2021" "" ""
- .SH "NAME"
- \fBnpm-pack\fR \- Create a tarball from a package
- .SS Synopsis
- .P
- .RS 2
- .nf
- npm pack [[<@scope>/]<pkg>\.\.\.] [\-\-dry\-run] [\-\-json]
- .fi
- .RE
- .SS Configuration
- <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBdry\-run\fP
- .RS 0
- .IP \(bu 2
- Default: false
- .IP \(bu 2
- Type: Boolean
- .RE
- .P
- Indicates that you don't want npm to make any changes and that it should
- only report what it would have done\. This can be passed into any of the
- commands that modify your local installation, eg, \fBinstall\fP, \fBupdate\fP,
- \fBdedupe\fP, \fBuninstall\fP, as well as \fBpack\fP and \fBpublish\fP\|\.
- .P
- Note: This is NOT honored by other network related commands, eg \fBdist\-tags\fP,
- \fBowner\fP, etc\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBjson\fP
- .RS 0
- .IP \(bu 2
- Default: false
- .IP \(bu 2
- Type: Boolean
- .RE
- .P
- Whether or not to output JSON data, rather than the normal output\.
- .RS 0
- .IP \(bu 2
- In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
- saving them to your \fBpackage\.json\fP\|\.
- .RE
- .P
- Not supported by all npm commands\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBpack\-destination\fP
- .RS 0
- .IP \(bu 2
- Default: "\."
- .IP \(bu 2
- Type: String
- .RE
- .P
- Directory in which \fBnpm pack\fP will save tarballs\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBworkspace\fP
- .RS 0
- .IP \(bu 2
- Default:
- .IP \(bu 2
- Type: String (can be set multiple times)
- .RE
- .P
- Enable running a command in the context of the configured workspaces of the
- current project while filtering by running only the workspaces defined by
- this configuration option\.
- .P
- Valid values for the \fBworkspace\fP config are either:
- .RS 0
- .IP \(bu 2
- Workspace names
- .IP \(bu 2
- Path to a workspace directory
- .IP \(bu 2
- Path to a parent workspace directory (will result in selecting all
- workspaces within that folder)
- .RE
- .P
- When set for the \fBnpm init\fP command, this may be set to the folder of a
- workspace which does not yet exist, to create the folder and set it up as a
- brand new workspace within the project\.
- .P
- This value is not exported to the environment for child processes\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBworkspaces\fP
- .RS 0
- .IP \(bu 2
- Default: null
- .IP \(bu 2
- Type: null or Boolean
- .RE
- .P
- Set to true to run the command in the context of \fBall\fR configured
- workspaces\.
- .P
- Explicitly setting this to false will cause commands like \fBinstall\fP to
- ignore workspaces altogether\. When not set explicitly:
- .RS 0
- .IP \(bu 2
- Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
- will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
- other things (test, exec, publish, etc\.) will operate on the root project,
- \fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
- .RE
- .P
- This value is not exported to the environment for child processes\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- .SS \fBinclude\-workspace\-root\fP
- .RS 0
- .IP \(bu 2
- Default: false
- .IP \(bu 2
- Type: Boolean
- .RE
- .P
- Include the workspace root when workspaces are enabled for a command\.
- .P
- When false, specifying individual workspaces via the \fBworkspace\fP config, or
- all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
- the specified workspaces, and not on the root project\.
- <!\-\- automatically generated, do not edit manually \-\->
- <!\-\- see lib/utils/config/definitions\.js \-\->
- <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
- .SS Description
- .P
- For anything that's installable (that is, a package folder, tarball,
- tarball url, git url, name@tag, name@version, name, or scoped name), this
- command will fetch it to the cache, copy the tarball to the current working
- directory as \fB<name>\-<version>\.tgz\fP, and then write the filenames out to
- stdout\.
- .P
- If the same package is specified multiple times, then the file will be
- overwritten the second time\.
- .P
- If no arguments are supplied, then npm packs the current package folder\.
- .SS See Also
- .RS 0
- .IP \(bu 2
- npm\-packlist package \fIhttp://npm\.im/npm\-packlist\fR
- .IP \(bu 2
- npm help cache
- .IP \(bu 2
- npm help publish
- .IP \(bu 2
- npm help config
- .IP \(bu 2
- npm help npmrc
- .RE
|