Set the theme

This commit is contained in:
Ionică Bizău 2015-05-28 21:51:49 +03:00
parent 780098afe9
commit b37d057c0e

View file

@ -85,16 +85,14 @@ if (authorsOpt.is_provided) {
options.repo = process.cwd(); options.repo = process.cwd();
options.no_ansi = noAnsiOpt.is_provided; options.no_ansi = noAnsiOpt.is_provided;
options.radius = (process.stdout.rows / 2) - 4; options.radius = (process.stdout.rows / 2) - 4;
} else {
options.theme = noAnsiOpt.is_provided ? null
: lightOpt.is_provided ? "LIGHT": "DARK"
;
} }
// Show the graphs // Show the graphs
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) { GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
if (err) { return Logger.log(err, "error"); } 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"); process.stdout.write(data + "\n");
}); });