Created
September 22, 2016 16:35
-
-
Save cuonggt/b4e1f21afade909a0ded309984fd8e37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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