Welcome to mirror list, hosted at ThFree Co, Russian Federation.

version.md « api « doc - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bd40102c457bf8b3f875bcb8c64321be1c60c90c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
npm-version(3) -- Bump a package version
========================================

## SYNOPSIS

    npm.commands.version(newversion, callback)

## DESCRIPTION

Run this in a package directory to bump the version and write the new
data back to the package.json file.

If run in a git repo, it will also create a version commit and tag, and
fail if the repo is not clean.

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.