gulp-bump
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -7,2 +7,3 @@ var map = require('map-stream'); | ||
if(!semver.inc('0.0.1', opts.type)) opts.type = false; | ||
if(!opts.indent) opts.indent = 2; | ||
// Map each file to this function | ||
@@ -16,3 +17,3 @@ function modifyContents(file, cb) { | ||
json.version = semver.valid(opts.version) || semver.inc(json.version, opts.type || 'patch'); | ||
file.contents = new Buffer(JSON.stringify(json, null, 2) + '\n'); | ||
file.contents = new Buffer(JSON.stringify(json, null, opts.indent) + '\n'); | ||
@@ -19,0 +20,0 @@ cb(null, file); |
{ | ||
"name": "gulp-bump", | ||
"description": "Bump npm versions with Gulp (gulpjs.com)", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"homepage": "http://github.com/stevelacy/gulp-bump", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/stevelacy/gulp-bump.git", |
@@ -87,4 +87,12 @@ #gulp-bump | ||
// Define the tab size for indenting | ||
gulp.task('bump', function(){ | ||
gulp.src('./package.json') | ||
.pipe(bump({type:'major', indent: 4 })) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
// Run the gulp tasks | ||
@@ -91,0 +99,0 @@ gulp.task('default', function(){ |
13887
240
167