versionup

2019-06-24 admin

versionup是什么

什么是versionup,Increment version number in package.json (or bower.json)

versionup使用教程帮助文档

versionup

<a name=“user-content-badges”></a>

Build Status npm Version JS Standard

<a name=“user-content-description”></a>

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

<a name=“user-content-sections”></a>

<a name=“user-content-section-doc-guides-01-installation-md”></a>

Installation

npm install versionup --save-dev

<a name=“user-content-section-doc-guides-02-usage-md”></a>

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})

#!/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(() => {
  /* ... */
})

<a name=“user-content-section-doc-guides-03-options-md”></a>

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.

<a name=“user-content-section-doc-guides-04-cli-md”></a>

Using with CLI

Install as a global module.

$ npm install versionup -g

Then,

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

<a name=“user-content-license”></a>

License

This software is released under the MIT License.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-68022.html

文章标题:versionup

回到顶部