Skip to content

Commit

Permalink
add example file
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 26, 2016
1 parent 4ce73b6 commit 492f11f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions example.js
@@ -0,0 +1,17 @@
'use strict';
const chalk = require('./');

// generates screenshot
for (const key of Object.keys(chalk.styles)) {
let ret = key;

if (key === 'reset' || key === 'hidden' || key === 'grey') {
continue;
}

if (/^bg[^B]/.test(key)) {
ret = chalk.black(ret);
}

process.stdout.write(chalk[key](ret) + ' ');
}
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -62,6 +62,9 @@
"envs": [
"node",
"mocha"
],
"ignores": [
"example.js"
]
}
}

0 comments on commit 492f11f

Please sign in to comment.