From b37d057c0e82623a98940b7a3a6ac2bf4c853403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Thu, 28 May 2015 21:51:49 +0300 Subject: [PATCH] Set the theme --- bin/git-stats | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/git-stats b/bin/git-stats index d1eb816..744981a 100755 --- a/bin/git-stats +++ b/bin/git-stats @@ -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"); });