-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
48 lines (37 loc) · 1.14 KB
/
main.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
const chalk = require('chalk');
const printLog = (msg) => {
console.log(chalk.bold('['+chalk.blue('!')+']')+' '+msg)
}
const cprintLog = (msg) => {
console.log(chalk.bold('('+chalk.blue('!')+')')+' '+msg)
}
const printWarning = (msg) => {
console.log(chalk.bold('['+chalk.yellow('!')+']')+' '+msg)
}
const cprintWarning = (msg) => {
console.log(chalk.bold('('+chalk.yellow('!')+')')+' '+msg)
}
const printAlert = (msg) => {
console.log(chalk.bold('['+chalk.red('!')+']')+' '+msg)
}
const cprintAlert = (msg) => {
console.log(chalk.bold('('+chalk.red('!')+')')+' '+msg)
}
const printSuccess = (msg) => {
console.log(chalk.bold('['+chalk.green('!')+']')+' '+msg)
}
const cprintSuccess = (msg) => {
console.log(chalk.bold('('+chalk.green('!')+')')+' '+msg)
}
const printCustom = (title,msg) => {
console.log(chalk.bold('['+chalk.blue(title)+']')+' '+msg)
}
exports.println = printLog;
exports.warn = printWarning;
exports.error = printAlert;
exports.success = printSuccess;
exports.custom = printCustom;
exports.cprint = cprintLog;
exports.cwarn = cprintWarning;
exports.cerror = cprintAlert;
exports.csuccess = cprintSuccess;