mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
679 B
13 lines
679 B
10 years ago
|
<h1><a href="../api/npm-version.html">npm-version</a></h1> <p>Bump a package version</p>
|
||
|
<h2 id="synopsis">SYNOPSIS</h2>
|
||
|
<pre><code>npm.commands.version(newversion, callback)
|
||
|
</code></pre><h2 id="description">DESCRIPTION</h2>
|
||
|
<p>Run this in a package directory to bump the version and write the new
|
||
|
data back to the package.json file.</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>Like all other commands, this function takes a string array as its first
|
||
|
parameter. The difference, however, is this function will fail if it does
|
||
|
not have exactly one element. The only element should be a version number.</p>
|
||
|
|