summaryrefslogtreecommitdiff
path: root/deps/npm/man/man1/npm-publish.1
blob: 20d1f36f6cd0d993fe739a04daf0a15db5ef241b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.TH "NPM\-PUBLISH" "1" "October 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
.P
.RS 2
.nf
npm publish <tarball> [\-\-tag <tag>] [\-\-access <public|restricted>]
npm publish <folder> [\-\-tag <tag>] [\-\-access <public|restricted>]
.fi
.RE
.SH DESCRIPTION
.P
Publishes a package to the registry so that it can be installed by name\. See
npm help 7 \fBnpm\-developers\fP for details on what's included in the published package, as
well as details on how the package is built\.
.P
By default npm will publish to the public registry\. This can be overridden by
specifying a different default registry or using a npm help 7 \fBnpm\-scope\fP in the name
(see npm help 5 \fBpackage\.json\fP)\.
.RS 0
.IP \(bu 2
\fB<folder>\fP:
A folder containing a package\.json file
.IP \(bu 2
\fB<tarball>\fP:
A url or file path to a gzipped tar archive containing a single folder
with a package\.json file inside\.
.IP \(bu 2
\fB[\-\-tag <tag>]\fP
Registers the published package with the given tag, such that \fBnpm install
<name>@<tag>\fP will install this version\.  By default, \fBnpm publish\fP updates
and \fBnpm install\fP installs the \fBlatest\fP tag\.
.IP \(bu 2
\fB[\-\-access <public|restricted>]\fP
Tells the registry whether this package should be published as public or
restricted\. Only applies to scoped packages, which default to \fBrestricted\fP\|\.
If you don't have a paid account, you must publish with \fB\-\-access public\fP
to publish scoped packages\.

.RE
.P
Fails if the package name and version combination already exists in
the specified registry\.
.P
Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
it is removed with npm help unpublish\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help 7 registry
.IP \(bu 2
npm help 7 scope
.IP \(bu 2
npm help adduser
.IP \(bu 2
npm help owner
.IP \(bu 2
npm help deprecate
.IP \(bu 2
npm help tag

.RE