The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / npm / man / man1 / version.1 @ 5aef65a9

History | View | Annotate | Download (1.4 KB)

1
.\" Generated with Ronnjs 0.3.8
2
.\" http://github.com/kapouer/ronnjs/
3
.
4
.TH "NPM\-VERSION" "1" "February 2013" "" ""
5
.
6
.SH "NAME"
7
\fBnpm-version\fR \-\- Bump a package version
8
.
9
.SH "SYNOPSIS"
10
.
11
.nf
12
npm version [<newversion> | major | minor | patch | build]
13
.
14
.fi
15
.
16
.SH "DESCRIPTION"
17
Run this in a package directory to bump the version and write the new
18
data back to the package\.json file\.
19
.
20
.P
21
The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a valid
22
second argument to semver\.inc (one of "build", "patch", "minor", or
23
"major")\. In the second case, the existing version will be incremented
24
by 1 in the specified field\.
25
.
26
.P
27
If run in a git repo, it will also create a version commit and tag, and
28
fail if the repo is not clean\.
29
.
30
.P
31
If supplied with \fB\-\-message\fR (shorthand: \fB\-m\fR) config option, npm will
32
use it as a commit message when creating a version commit\.  If the \fBmessage\fR config contains \fB%s\fR then that will be replaced with the
33
resulting version number\.  For example:
34
.
35
.IP "" 4
36
.
37
.nf
38
npm version patch \-m "Upgrade to %s for reasons"
39
.
40
.fi
41
.
42
.IP "" 0
43
.
44
.P
45
If the \fBsign\-git\-tag\fR config is set, then the tag will be signed using
46
the \fB\-s\fR flag to git\.  Note that you must have a default GPG key set up
47
in your git config for this to work properly\.
48
.
49
.SH "SEE ALSO"
50
.
51
.IP "\(bu" 4
52
npm help init
53
.
54
.IP "\(bu" 4
55
npm help json
56
.
57
.IP "\(bu" 4
58
npm help semver
59
.
60
.IP "" 0
61