Skip to content

Instantly share code, notes, and snippets.

@cuonggt
Created September 22, 2016 16:35
Show Gist options
  • Select an option

  • Save cuonggt/b4e1f21afade909a0ded309984fd8e37 to your computer and use it in GitHub Desktop.

Select an option

Save cuonggt/b4e1f21afade909a0ded309984fd8e37 to your computer and use it in GitHub Desktop.
var colors = require('colors');
colors.setTheme({
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red',
h1: 'grey',
h2: 'yellow'
});
function success(message) {
console.log(colors.green('\u2714'), message);
}
function info(message) {
console.log(colors.info(message));
}
function warning(message) {
console.log(colors.warn(message));
}
function error(message) {
console.log(colors.error(message));
}
function title(message) {
console.log(colors.h1.bold(message));
}
function subtitle(message) {
console.log(colors.h2.bold(message));
}
module.exports = {
success: success,
info: info,
warning: warning,
error: error,
title: title,
subtitle: subtitle
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment