1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
4 .TH "NPM\-VERSION" "1" "December 2013" "" ""
7 \fBnpm-version\fR \-\- Bump a package version
12 npm version [<newversion> | major | minor | patch]
17 Run this in a package directory to bump the version and write the new
18 data back to the package\.json file\.
21 The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a valid
22 second argument to semver\.inc (one of "patch", "minor", or
23 "major")\. In the second case, the existing version will be incremented
24 by 1 in the specified field\.
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\.
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:
38 npm version patch \-m "Upgrade to %s for reasons"
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\. For example:
52 $ npm config set sign\-git\-tag true
54 You need a passphrase to unlock the secret key for
55 user: "isaacs (http://blog\.izs\.me/) <i@izs\.me>"
56 2048\-bit RSA key, ID 6C481CF6, created 2010\-08\-31
69 npm help package\.json