mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 13:22:11 +01:00
Fixed the theme
This commit is contained in:
parent
30dacb7de8
commit
53366e8794
1 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,7 @@ var GitStats = new (require("../lib"))()
|
||||||
, Logger = require("bug-killer")
|
, Logger = require("bug-killer")
|
||||||
, CLP = require("clp")
|
, CLP = require("clp")
|
||||||
, Abs = require("abs")
|
, Abs = require("abs")
|
||||||
|
, Typpy = require("typpy")
|
||||||
, Package = require("../package")
|
, Package = require("../package")
|
||||||
, ReadJson = require("r-json")
|
, ReadJson = require("r-json")
|
||||||
;
|
;
|
||||||
|
@ -152,11 +153,16 @@ if (authorsOpt.is_provided || globalActivityOpt.is_provided) {
|
||||||
if (authorsOpt.is_provided) {
|
if (authorsOpt.is_provided) {
|
||||||
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 {
|
}
|
||||||
|
|
||||||
|
if (!authorsOpt.is_provided || globalActivityOpt.is_provided) {
|
||||||
options.firstDay = firstDayOpt.value;
|
options.firstDay = firstDayOpt.value;
|
||||||
// This can be a string or an object
|
// This can be a string or an object
|
||||||
if (GitStats.config.theme) {
|
if (/^object|string$/.test(Typpy(GitStats.config.theme))) {
|
||||||
options.theme = GitStats.config.theme;
|
options.theme = GitStats.config.theme;
|
||||||
|
if (!/^DARK|LIGHT$/.test(options.theme)) {
|
||||||
|
options.theme = null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
options.theme = noAnsiOpt.is_provided ? null
|
options.theme = noAnsiOpt.is_provided ? null
|
||||||
: lightOpt.is_provided ? "LIGHT": "DARK"
|
: lightOpt.is_provided ? "LIGHT": "DARK"
|
||||||
|
|
Loading…
Reference in a new issue