Skip to content

Commit

Permalink
Update safe mode examples to avoid deprecated setTheme syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
DABH committed Jul 22, 2018
1 parent cfef595 commit 3492add
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/safe-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ console.log('Setting themes is useful');
// Load theme with JSON literal
colors.setTheme({
silly: 'rainbow',
input: 'grey',
input: 'blue',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
Expand All @@ -54,14 +54,14 @@ console.log(colors.error('this is an error'));
// outputs yellow text
console.log(colors.warn('this is a warning'));

// outputs grey text
// outputs blue text
console.log(colors.input('this is an input'));


// console.log('Generic logging theme as file'.green.bold.underline);

// Load a theme from file
colors.setTheme(__dirname + '/../themes/generic-logging.js');
colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));

// outputs red text
console.log(colors.error('this is an error'));
Expand Down

0 comments on commit 3492add

Please sign in to comment.