| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | .TH "NPM\-PUBLISH" "1" "August 2021" "" "".SH "NAME"\fBnpm-publish\fR \- Publish a package.SS Synopsis.P.RS 2.nfnpm publish [<tarball>|<folder>] [\-\-tag <tag>] [\-\-access <public|restricted>] [\-\-otp otpcode] [\-\-dry\-run]Publishes '\.' if no argument suppliedSets tag 'latest' if no \-\-tag specified.fi.RE.SS Description.PPublishes a package to the registry so that it can be installed by name\. Allfiles in the package directory are included if no local \fB\|\.gitignore\fP or\fB\|\.npmignore\fP file exists\. If both files exist and a file is ignored by\fB\|\.gitignore\fP but not by \fB\|\.npmignore\fP then it will be included\.  Seenpm help \fBdevelopers\fP for full details on what's included in the published package, as well as details on how the package is built\..PBy default npm will publish to the public registry\. This can be overridden byspecifying a different default registry or using a npm help \fBscope\fP in the name (see npm help \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 folderwith a package\.json file inside\..IP \(bu 2\fB[\-\-tag <tag>]\fPRegisters the published package with the given tag, such that \fBnpm install<name>@<tag>\fP will install this version\.  By default, \fBnpm publish\fP updatesand \fBnpm install\fP installs the \fBlatest\fP tag\. See \fBnpm\-dist\-tag\fP \fInpm\-dist\-tag\fR fordetails about tags\..IP \(bu 2\fB[\-\-access <public|restricted>]\fPTells the registry whether this package should be published as public orrestricted\. 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\fPto publish scoped packages\..IP \(bu 2\fB[\-\-otp <otpcode>]\fPIf you have two\-factor authentication enabled in \fBauth\-and\-writes\fP modethen you can provide a code from your authenticator with this\. If youdon't include this and you're running from a TTY then you'll be prompted\..IP \(bu 2\fB[\-\-dry\-run]\fPAs of \fBnpm@6\fP, does everything publish would do except actually publishingto the registry\. Reports the details of what would have been published\..RE.PFails if the package name and version combination already exists inthe specified registry\..POnce a package is published with a given name and version, thatspecific name and version combination can never be used again, even ifit is removed with npm help \fBunpublish\fP\|\..PAs of \fBnpm@5\fP, both a sha1sum and an integrity field with a sha512sum of thetarball will be submitted to the registry during publication\. Subsequentinstalls will use the strongest supported algorithm to verify downloads\..PSimilar to \fB\-\-dry\-run\fP see npm help \fBpack\fP, which figures out the files to beincluded and packs them into a tarball to be uploaded to the registry\..SS See Also.RS 0.IP \(bu 2npm help registry.IP \(bu 2npm help scope.IP \(bu 2npm help adduser.IP \(bu 2npm help owner.IP \(bu 2npm help deprecate.IP \(bu 2npm help dist\-tag.IP \(bu 2npm help pack.IP \(bu 2npm help profile.RE
 |