-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·48 lines (41 loc) · 1.01 KB
/
cli.js
File metadata and controls
executable file
·48 lines (41 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env node
const figlet = require("figlet");
const data = require("./lib/data");
const { render } = require("prettyjson");
const colors = require('colors');
function createBannerString(font) {
return figlet.textSync(
"DustyCode!",
{
font: font,
horizontalLayout: "universal smushing",
verticalLayout: "default",
width: 110,
whitespaceBreak: true
}
)
}
let renderOptions;
let font;
let banner;
const today = new Date()
if(today.getMonth() == 9) {
font = "Poison"
renderOptions = {
dashColor: "red",
keysColor: "yellow",
stringColor: "white"
}
data["message"] = "Happy Halloween!"
banner = colors.red(createBannerString(font));
} else {
font = "Chunky"
renderOptions = {
dashColor: "cyan",
keysColor: "magenta",
stringColor: "white"
}
banner = colors.magenta(createBannerString(font));
}
console.log(banner);
console.log(render(data, renderOptions))