Updates
This commit is contained in:
30
lowcoder/client/packages/lowcoder-cli/util/log.js
Normal file
30
lowcoder/client/packages/lowcoder-cli/util/log.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import chalk from "chalk";
|
||||
|
||||
const colors = [
|
||||
"black",
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
"gray",
|
||||
"redBright",
|
||||
"greenBright",
|
||||
"yellowBright",
|
||||
"blueBright",
|
||||
"magentaBright",
|
||||
"cyanBright",
|
||||
"whiteBright",
|
||||
];
|
||||
|
||||
colors.forEach((color) => {
|
||||
console[color] = (text) => {
|
||||
console.log(chalk[color](text));
|
||||
};
|
||||
});
|
||||
|
||||
export const logBug = (text) => {
|
||||
console.red(`${text}\n This maybe is a bug, you can issue a bug for us.`);
|
||||
};
|
||||
Reference in New Issue
Block a user