mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-11-14 08:01:15 +01:00
Send the radius and no_ansi values
This commit is contained in:
parent
2c26a37c9a
commit
25ad4f7afd
1 changed files with 8 additions and 3 deletions
11
lib/index.js
11
lib/index.js
|
@ -155,11 +155,11 @@ GitStats.iterateDays = function (data, callback) {
|
|||
}
|
||||
|
||||
// Merge the defaults
|
||||
data = Ul.merge({
|
||||
data = Ul.merge(data, {
|
||||
end: Moment()
|
||||
, start: Moment().subtract(1, "years")
|
||||
, format: DATE_FORMAT
|
||||
}, data);
|
||||
});
|
||||
|
||||
var start = data.start
|
||||
, end = data.end
|
||||
|
@ -409,6 +409,10 @@ GitStats.authorsPie = function (options, callback) {
|
|||
};
|
||||
}
|
||||
|
||||
options = Ul.merge(options, {
|
||||
radius: process.stdout.rows / 2 || 20
|
||||
});
|
||||
|
||||
if (!IsThere.sync(options.repo)) {
|
||||
return callback(new Error("Repository is missing."));
|
||||
}
|
||||
|
@ -432,9 +436,10 @@ GitStats.authorsPie = function (options, callback) {
|
|||
};
|
||||
});
|
||||
|
||||
pie = new CliPie(20, pieData, {
|
||||
pie = new CliPie(options.radius, pieData, {
|
||||
legend: true
|
||||
, flat: true
|
||||
, no_ansi: options.no_ansi
|
||||
});
|
||||
|
||||
callback(null, pie.toString());
|
||||
|
|
Loading…
Reference in a new issue