node/deps/npm/man/man1/npm-publish.1

66 lines
1.9 KiB
Groff
Raw Normal View History

.TH "NPM\-PUBLISH" "1" "February 2015" "" ""
.SH "NAME"
2014-09-25 05:41:07 +08:00
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
.P
.RS 2
2014-11-05 07:08:12 +08:00
.nf
npm publish <tarball> [\-\-tag <tag>] [\-\-access <public|restricted>]
npm publish <folder> [\-\-tag <tag>] [\-\-access <public|restricted>]
2014-11-05 07:08:12 +08:00
.fi
2014-09-25 05:41:07 +08:00
.RE
.SH DESCRIPTION
.P
2014-11-05 07:08:12 +08:00
Publishes a package to the registry so that it can be installed by name\. See
npm help 7 \fBnpm\-developers\fR for details on what's included in the published package, as
well as details on how the package is built\.
2014-09-25 05:41:07 +08:00
.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\fR in the name
(see npm help 5 \fBpackage\.json\fR)\.
.RS 0
.IP \(bu 2
\fB<folder>\fR:
A folder containing a package\.json file
2014-09-25 05:41:07 +08:00
.IP \(bu 2
\fB<tarball>\fR:
A url or file path to a gzipped tar archive containing a single folder
with a package\.json file inside\.
2014-09-25 05:41:07 +08:00
.IP \(bu 2
\fB[\-\-tag <tag>]\fR
Registers the published package with the given tag, such that \fBnpm install
<name>@<tag>\fR will install this version\. By default, \fBnpm publish\fR updates
and \fBnpm install\fR installs the \fBlatest\fR tag\.
.IP \(bu 2
\fB[\-\-access <public|restricted>]\fR
Tells the registry whether this package should be published as public or
restricted\. Only applies to scoped packages, which default to \fBrestricted\fR\|\.
If you don't have a paid account, you must publish with \fB\-\-access public\fR
to publish scoped packages\.
2014-09-25 05:41:07 +08:00
.RE
.P
Fails if the package name and version combination already exists in
2014-09-25 05:41:07 +08:00
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
2014-09-17 06:38:50 +08:00
it is removed with npm help unpublish\.
2014-09-25 05:41:07 +08:00
.SH SEE ALSO
.RS 0
.IP \(bu 2
2014-09-17 06:38:50 +08:00
npm help 7 registry
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help 7 scope
.IP \(bu 2
npm help adduser
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help owner
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help deprecate
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help tag
2014-09-25 05:41:07 +08:00
.RE