| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | var colors = require('../safe'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.yellow('First some yellow text')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.yellow.underline('Underline that text')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.red.bold('Make it bold and red')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.rainbow('Double Raindows All Day Long')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.trap('Drop the bass')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS'))); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | // styles not widely supported
 | 
					
						
							|  |  |  | console.log(colors.bold.italic.underline.red('Chains are also cool.')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | // styles not widely supported
 | 
					
						
							|  |  |  | console.log(colors.green('So ') + colors.underline('are') + ' ' | 
					
						
							|  |  |  |   + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.zebra('Zebras are so fun!')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log('This is ' + colors.strikethrough('not') + ' fun.'); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | console.log(colors.black.bgWhite('Background color attack!')); | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.random('Use random styles on everything!')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | console.log(colors.america('America, Heck Yeah!')); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log('Setting themes is useful'); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // Custom themes
 | 
					
						
							|  |  |  | //
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | // console.log('Generic logging theme as JSON'.green.bold.underline);
 | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | // Load theme with JSON literal
 | 
					
						
							|  |  |  | colors.setTheme({ | 
					
						
							|  |  |  |   silly: 'rainbow', | 
					
						
							| 
									
										
										
										
											2018-07-22 14:17:35 -07:00
										 |  |  |   input: 'blue', | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  |   verbose: 'cyan', | 
					
						
							|  |  |  |   prompt: 'grey', | 
					
						
							|  |  |  |   info: 'green', | 
					
						
							|  |  |  |   data: 'grey', | 
					
						
							|  |  |  |   help: 'cyan', | 
					
						
							|  |  |  |   warn: 'yellow', | 
					
						
							|  |  |  |   debug: 'blue', | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  |   error: 'red', | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // outputs red text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.error('this is an error')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // outputs yellow text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.warn('this is a warning')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-22 14:17:35 -07:00
										 |  |  | // outputs blue text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.input('this is an input')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // console.log('Generic logging theme as file'.green.bold.underline);
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Load a theme from file
 | 
					
						
							| 
									
										
										
										
											2018-07-22 14:17:35 -07:00
										 |  |  | colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // outputs red text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.error('this is an error')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // outputs yellow text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.warn('this is a warning')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // outputs grey text
 | 
					
						
							| 
									
										
										
										
											2018-04-30 14:59:34 -07:00
										 |  |  | console.log(colors.input('this is an input')); | 
					
						
							| 
									
										
										
										
											2014-09-30 22:41:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // console.log(colors.zalgo("Don't summon him"))
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 |