git-mikado/src/log.js

15 lines
442 B
JavaScript
Raw Permalink Normal View History

2021-11-25 19:01:49 +00:00
const emoji = require("node-emoji");
const chalk = require("chalk");
function groomLog(...entries) {
2021-11-25 19:01:49 +00:00
console.log(...entries.map(emoji.emojify));
}
module.exports = {
2021-11-25 19:01:49 +00:00
info: groomLog,
title: (title) => groomLog("\n", chalk.blue.bold(title)),
subtitle: (title) => groomLog("\n", chalk.blue(title)),
error: (message) => groomLog(":skull:", chalk.red(message)),
success: (message) => groomLog(":sparkles:", chalk.green(message)),
};