mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-11-14 08:01:15 +01:00
Added the authors options and append the cwd to options.
This commit is contained in:
parent
6c0a36e131
commit
93abe47f1d
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,7 @@ var recordOpt = new CLP.Option(["record"], "Records a new commit. Don't use this
|
|||
, noAnsiOpt
|
||||
, lightOpt
|
||||
, recordOpt
|
||||
, authorsOpt
|
||||
])
|
||||
, options = null
|
||||
;
|
||||
|
@ -80,6 +81,10 @@ if (!options.end || !options.end.isValid()) {
|
|||
Logger.log("Invalid end date. Using default instead (" + options.end.format("LL") + ").", "warn");
|
||||
}
|
||||
|
||||
if (authorsOpt.is_provided) {
|
||||
options.repo = process.cwd();
|
||||
}
|
||||
|
||||
// Show the graphs
|
||||
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
|
||||
if (err) { return Logger.log(err, "error"); }
|
||||
|
@ -88,5 +93,4 @@ GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, functi
|
|||
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
||||
}
|
||||
process.stdout.write(data + "\n");
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue