Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/okunishinishi/node-versionup

Node.js module to increment version number in package.json (or bower.json)
https://github.com/okunishinishi/node-versionup

Last synced: 2 months ago
JSON representation

Node.js module to increment version number in package.json (or bower.json)

Awesome Lists containing this project

README

        

versionup
==========

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/okunishinishi/node-versionup
[bd_travis_url]: http://travis-ci.org/okunishinishi/node-versionup
[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-versionup.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/okunishinishi/node-versionup
[bd_travis_com_shield_url]: https://api.travis-ci.com/okunishinishi/node-versionup.svg?token=
[bd_license_url]: https://github.com/okunishinishi/node-versionup/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-versionup
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-versionup.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-versionup.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-versionup
[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-versionup.svg
[bd_npm_url]: http://www.npmjs.org/package/versionup
[bd_npm_shield_url]: http://img.shields.io/npm/v/versionup.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

Increment version number in package.json (or bower.json)

Installation
-----

```bash
npm install versionup --save-dev
```

Usage
----

Call `versionup()` at project root path where `package.json` exists.

Version number will be incremented. (eg. `{"version" : "1.0.0}` -> `{"version" : "1.0.1}`)

```javascript
#!/usr/bin/env node

/**
* This is an example to use versionup.
*/

'use strict'

const versionup = require('versionup')

// Increment version number in package.json (or bower.json).
versionup({
// Options
}).then(() => {
/* ... */
})

````

Options
---------

| Key | Default | Description |
| --- | --- | --- |
| path | process.cwd() | Project root path or json file path to work with |
| level | 'patch' | Level to change. "major", "minor", or "patch". |
| amount | 1 | Amount to increment. |

Using with CLI
---------

Install as a global module.

```bash
$ npm install versionup -g
```

Then,

```bash
$ versionup -p "~/my_project" -l "micro" -a "1"
```

License
-------
This software is released under the [MIT License](https://github.com/okunishinishi/node-versionup/blob/master/LICENSE).