1NPM-PACK(1)                                                        NPM-PACK(1)
2
3
4

NAME

6       npm-pack - Create a tarball from a package
7
8   Synopsis
9         npm pack [[<@scope>/]<pkg>...] [--dry-run] [--json]
10
11   Configuration
12       <!--  AUTOGENERATED  CONFIG  DESCRIPTIONS  START --> <!-- automatically
13       generated, do not edit manually --> <!--  see  lib/utils/config/defini‐
14       tions.js -->
15
16   dry-run
17       • Default: false
18
19       • Type: Boolean
20
21
22       Indicates  that  you  don't  want  npm  to make any changes and that it
23       should only report what it would have done. This can be passed into any
24       of  the  commands that modify your local installation, eg, install, up‐
25       date, dedupe, uninstall, as well as pack and publish.
26
27       Note: This is  NOT  honored  by  other  network  related  commands,  eg
28       dist-tags, owner, etc.  <!-- automatically generated, do not edit manu‐
29       ally --> <!-- see lib/utils/config/definitions.js -->
30
31
32   json
33       • Default: false
34
35       • Type: Boolean
36
37
38       Whether or not to output JSON data, rather than the normal output.
39
40       • In npm pkg set it enables parsing set values with JSON.parse() before
41         saving them to your package.json.
42
43
44       Not  supported  by  all npm commands.  <!-- automatically generated, do
45       not edit manually --> <!-- see lib/utils/config/definitions.js -->
46
47
48   pack-destination
49       • Default: "."
50
51       • Type: String
52
53
54       Directory in which npm pack will  save  tarballs.   <!--  automatically
55       generated,  do  not edit manually --> <!-- see lib/utils/config/defini‐
56       tions.js -->
57
58
59   workspace
60       • Default:
61
62       • Type: String (can be set multiple times)
63
64
65       Enable running a command in the context of the configured workspaces of
66       the  current project while filtering by running only the workspaces de‐
67       fined by this configuration option.
68
69       Valid values for the workspace config are either:
70
71       • Workspace names
72
73       • Path to a workspace directory
74
75       • Path to a parent workspace directory (will result to selecting all of
76         the nested workspaces)
77
78
79       When  set  for the npm init command, this may be set to the folder of a
80       workspace which does not yet exist, to create the folder and set it  up
81       as a brand new workspace within the project.
82
83       This  value  is  not  exported  to the environment for child processes.
84       <!-- automatically  generated,  do  not  edit  manually  -->  <!--  see
85       lib/utils/config/definitions.js -->
86
87
88   workspaces
89       • Default: false
90
91       • Type: Boolean
92
93
94       Enable  running  a  command  in  the  context  of  all  the  configured
95       workspaces.
96
97       This value is not exported to  the  environment  for  child  processes.
98       <!--  automatically  generated,  do  not  edit  manually  -->  <!-- see
99       lib/utils/config/definitions.js -->
100
101       <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
102
103
104   Description
105       For anything that's installable (that is, a  package  folder,  tarball,
106       tarball  url,  git  url, name@tag, name@version, name, or scoped name),
107       this command will fetch it to the cache, copy the tarball to  the  cur‐
108       rent  working  directory  as  <name>-<version>.tgz,  and then write the
109       filenames out to stdout.
110
111       If the same package is specified multiple times, then the file will  be
112       overwritten the second time.
113
114       If  no  arguments  are  supplied,  then  npm  packs the current package
115       folder.
116
117   See Also
118       • npm-packlist package http://npm.im/npm-packlist
119
120       • npm help cache
121
122       • npm help publish
123
124       • npm help config
125
126       • npm help npmrc
127
128
129
130
131                                 October 2021                      NPM-PACK(1)
Impressum