@ -10,7 +10,7 @@
< h2 id = "SYNOPSIS" > SYNOPSIS< / h2 >
< pre > < code > npm version < newversion> [--message commit-message ]< / code > < / pre >
< pre > < code > npm version [ < newversion> | major | minor | patch | build ]< / code > < / pre >
< h2 id = "DESCRIPTION" > DESCRIPTION< / h2 >
@ -18,20 +18,29 @@
data back to the package.json file.< / p >
< p > The < code > newversion< / code > argument should be a valid semver string, < em > or< / em > a valid
second argument to semver.inc (one of "patch", "minor", or "major"). In
the second case, the existing version will be incremented by that amount.< / p >
second argument to semver.inc (one of "build", "patch", "minor", or
"major"). In the second case, the existing version will be incremented
by 1 in the specified field.< / p >
< p > If run in a git repo, it will also create a version commit and tag, and
fail if the repo is not clean.< / p >
< p > If supplied with < code > --message< / code > (shorthand: < code > -m< / code > ) command line option, npm
will use it as a commit message when creating a version commit.< / p >
< p > If supplied with < code > --message< / code > (shorthand: < code > -m< / code > ) config option, npm will
use it as a commit message when creating a version commit. If the
< code > message< / code > config contains < code > %s< / code > then that will be replaced with the
resulting version number. For example:< / p >
< pre > < code > npm version patch -m "Upgrade to %s for reasons"< / code > < / pre >
< p > If the < code > sign-git-tag< / code > config is set, then the tag will be signed using
the < code > -s< / code > flag to git. Note that you must have a default GPG key set up
in your git config for this to work properly.< / p >
< h2 id = "SEE-ALSO" > SEE ALSO< / h2 >
< ul > < li > < a href = "../doc/init.html" > init(1)< / a > < / li > < li > < a href = "../doc/json.html" > json(1)< / a > < / li > < li > < a href = "../doc/semver.html" > semver(1)< / a > < / li > < / ul >
< / div >
< p id = "footer" > version — npm@1.1.36< / p >
< p id = "footer" > version — npm@1.1.41 < / p >
< script >
;(function () {
var wrapper = document.getElementById("wrapper")