Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Commit

Permalink
feat(verbose): only log if verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed Jul 24, 2015
1 parent 2b882dd commit 4e3e717
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
'use strict';
var addStream = require('add-stream');
var assign = require('object-assign');
var concat = require('concat-stream');
var conventionalChangelog = require('conventional-changelog');
var gutil = require('gulp-util');
var through = require('through2');

module.exports = function(opts, context, gitRawCommitsOpts, parserOpts, writerOpts) {
opts = opts || {};
opts.warn = gutil.log;
opts = assign({
// TODO: remove this when gulp get's a real logger with levels
verbose: process.argv.indexOf('--verbose') !== -1
}, opts);

if (opts.verbose) {
opts.warn = gutil.log;
}

return through.obj(function(file, enc, cb) {
if (file.isNull()) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"concat-stream": "^1.5.0",
"conventional-changelog": "^0.2.1",
"gulp-util": "^3.0.6",
"object-assign": "^3.0.0",
"through2": "^2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 4e3e717

Please sign in to comment.