GitXplorerGitXplorer
w

bump-file

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
0334bd09bf4fe545bde5f74af4f91251be68c532

Fix package name in readme (fixes #1)

wwebpro committed 5 years ago
Unverified
dfb1e3c7517cb1709f673c93968bbe4cc0ae08bf

Release 2.0.0

wwebpro committed 6 years ago
Unverified
967358a78e748108f9a81ff87af3ce4191c11c93

Housekeeping

wwebpro committed 6 years ago
Unverified
1136debba39f78818a40307514301abd671f9d18

Release 1.0.0

wwebpro committed 7 years ago
Unverified
5171df14a60bec59e8af47ea9ad4510d68d2f2c3

Initial commit

wwebpro committed 7 years ago
Unverified
b471a80dbcec2db7008c4185ad58cb4673c06ce9

Initial commit

wwebpro committed 7 years ago

README

The README file for this repository.

bump-file

Installation

npm install bump-file

Usage

Node.js

import bump from 'bump-file';

bump(file, [increment='patch']);

The second argument can also be an object:

bump(file, {
  increment,
  preId,        // Prerelease identifier (such as "alpha", "beta", "rc")
  get,          // Function to get version. Default: pkg => pkg.version
  set           // Function to set version. Default: (pkg, version) => pkg.version = version
});

CLI

You can install this globally (npm install -g bump-file), and use from CLI:

bump file [increment] [preId]

Examples

bump('package.json', 'minor'); // 1.0.0 → 1.1.0

bump('package.json', {         // 1.4.2 → 2.0.0-beta.0
  increment: 'premajor',
  preId: 'beta'
});

See the tests for more example.