Skip to content

Commit

Permalink
Merge pull request #22 from privatenumber/screenshot-with-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Feb 3, 2023
2 parents 3383881 + 51f6d82 commit 7b997d6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
Binary file added .github/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions .github/demo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// npx ts-node-transpile-only .github/demo.ts
import * as k from '../src/index';

const modifiers = ['reset', 'bold', 'dim', 'italic', 'underline', 'inverse', 'hidden', 'strikethrough'];
const colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray'];
const lightColors = ['lightRed', 'lightGreen', 'lightYellow', 'lightBlue', 'lightMagenta', 'lightCyan', 'lightGray'];
const bgColors = ['bgBlack', 'bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', 'bgWhite', 'bgGray'];
const bgLightColors = ['bgLightRed', 'bgLightGreen', 'bgLightYellow', 'bgLightBlue', 'bgLightMagenta', 'bgLightCyan'];

console.log(modifiers.map(m => k[m](m)).join(' '));
console.log(colors.map(m => k[m](m)).join(' '));
console.log(lightColors.map(m => k[m](m)).join(' '));
console.log(bgColors.map(m => k[m](m)).join(' '));
console.log(bgLightColors.map(m => k[m](m)).join(' '));
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Tiny library to put colors into stdin/stdout :tada:

![Screenshot of terminal colors](screenshot.png)
![Screenshot of terminal colors](.github/demo.png)

## Usage

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"./*": "./*"
},
"files": [
"dist/",
"screenshot.png"
"dist/"
],
"prettier": {
"useTabs": true,
Expand Down
Binary file removed screenshot.png
Binary file not shown.

0 comments on commit 7b997d6

Please sign in to comment.