Comparing version 1.0.0 to 1.0.1
15
index.js
@@ -16,12 +16,13 @@ /*jshint node:true */ | ||
if (!opt) { | ||
opt = { | ||
silent: false | ||
}; | ||
opt = {}; | ||
} | ||
if (typeof opt.silent === 'undefined') { | ||
opt.silent = false; | ||
} | ||
return es.map(function (file, cb){ | ||
opt.file = file; | ||
var cmd = gutil.template(command, opt); | ||
var cmd = gutil.template(command, {file: file, options: opt}); | ||
exec(cmd, function (error, stdout, stderr) { | ||
if (stderr) { | ||
if (!opt.silent && stderr) { | ||
gutil.log(stderr); | ||
@@ -32,3 +33,3 @@ } | ||
} | ||
if (stdout) { | ||
if (!opt.silent && stdout) { | ||
gutil.log(stdout); | ||
@@ -35,0 +36,0 @@ } |
{ | ||
"name": "gulp-exec", | ||
"description": "exec plugin for gulp", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/robrich/gulp-exec", | ||
@@ -20,2 +20,6 @@ "repository": "git://github.com/robrich/gulp-exec.git", | ||
}, | ||
"peerDependencies": { | ||
"gulp": "~3.0.0" | ||
}, | ||
"scripts": { | ||
@@ -22,0 +26,0 @@ "test": "mocha" |
@@ -15,3 +15,8 @@  | ||
gulp.task('reset', function() { | ||
gulp.src('./**/**').pipe(exec('git checkout <%= file.path %>')); | ||
var options = { | ||
silent: true, | ||
customTemplatingThing: "test" | ||
}; | ||
gulp.src('./**/**') | ||
.pipe(exec('git checkout <%= file.path %> <%= options.customTemplatingThing %>', options)); | ||
}); | ||
@@ -18,0 +23,0 @@ ``` |
4643
51
3