-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.js
56 lines (50 loc) · 998 Bytes
/
demo.js
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
49
50
51
52
53
54
55
56
const style = require("./index");
const fs = require("fs");
const settings = JSON.parse(
fs.readFileSync("./package.json", { encoding: "utf8" })
);
const colors = {
bamboo_green: "#2CC880",
logo_orange: "#FFC831",
dash_purple: "#C770FF",
royal_blue: "#6D9FFF",
};
const styles = {
logo: {
weight: "bold",
color: "logo_orange",
},
name: {
weight: "bold",
decoration: "underline",
style: "italic",
color: "#FFFFFF",
},
version: {
weight: "bold",
color: "bamboo_green",
},
license: {
weight: "bold",
color: "dash_purple",
},
description: {
color: "rand semi-dark",
},
copyrights: {
color: "#505050",
},
};
style.saveColors(colors);
style.saveStyles(styles);
const data = {
name: settings.name,
version: settings.version,
license: settings.license,
desc: settings.description,
copyrights: settings.author,
};
style.render("./demo.log", data, (err, res) => {
if (err) throw err;
console.log(res);
});