Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Add key example
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlacy committed Feb 28, 2014
1 parent 7de57ec commit 9c57e21
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you are just requiring a bump for npm, consider using [npm version](https://n

## Example

```javascript
```js
var gulp = require('gulp');
var bump = require('gulp-bump');

Expand Down Expand Up @@ -91,6 +91,13 @@ gulp.task('bump', function(){
.pipe(gulp.dest('./'));
});

// Define the key for versioning off
gulp.task('bump', function(){
gulp.src('./package.json')
.pipe(bump({key: "appversion"}))
.pipe(gulp.dest('./'));
});




Expand All @@ -110,14 +117,31 @@ What type of version to bump to.
Type: `String`
Default: `patch`

### options.key
Set the versioning key

Type: `String`
Default: `version`

Example:
```js

.pipe(bump({key: 'appversion'}))
.pipe(bump({key: 'build-version'}))
.pipe(bump({key: 'dev-version", type: 'major'}))
```
### options.version
Set a specific version.
Type: `String`
Default: `none`
Example:
```javascript
```js
.pipe(bump({version: '1.2.3'}))
.pipe(bump({version: '1.0.0-alpha'}))
Expand Down

0 comments on commit 9c57e21

Please sign in to comment.