mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2025-01-03 02:12:10 +01:00
Set the theme
This commit is contained in:
parent
780098afe9
commit
b37d057c0e
1 changed files with 4 additions and 6 deletions
|
@ -85,16 +85,14 @@ if (authorsOpt.is_provided) {
|
|||
options.repo = process.cwd();
|
||||
options.no_ansi = noAnsiOpt.is_provided;
|
||||
options.radius = (process.stdout.rows / 2) - 4;
|
||||
} else {
|
||||
options.theme = noAnsiOpt.is_provided ? null
|
||||
: lightOpt.is_provided ? "LIGHT": "DARK"
|
||||
;
|
||||
}
|
||||
|
||||
// Show the graphs
|
||||
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
|
||||
if (err) { return Logger.log(err, "error"); }
|
||||
if (!authorsOpt.is_provided) {
|
||||
data = AnsiParser.removeAnsi(data);
|
||||
if (!noAnsiOpt.is_provided) {
|
||||
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
||||
}
|
||||
}
|
||||
process.stdout.write(data + "\n");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue