diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/ansi-styles | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/ansi-styles')
-rw-r--r-- | node_modules/ansi-styles/index.js | 23 | ||||
-rw-r--r-- | node_modules/ansi-styles/package.json | 6 | ||||
-rw-r--r-- | node_modules/ansi-styles/readme.md | 2 |
3 files changed, 23 insertions, 8 deletions
diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js index 3d3baa66d..90a871c4d 100644 --- a/node_modules/ansi-styles/index.js +++ b/node_modules/ansi-styles/index.js @@ -102,30 +102,43 @@ function assembleStyles() { }); } + const ansi2ansi = n => n; const rgb2rgb = (r, g, b) => [r, g, b]; styles.color.close = '\u001B[39m'; styles.bgColor.close = '\u001B[49m'; - styles.color.ansi = {}; - styles.color.ansi256 = {}; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; styles.color.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 0) }; - styles.bgColor.ansi = {}; - styles.bgColor.ansi256 = {}; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; styles.bgColor.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 10) }; - for (const key of Object.keys(colorConvert)) { + for (let key of Object.keys(colorConvert)) { if (typeof colorConvert[key] !== 'object') { continue; } const suite = colorConvert[key]; + if (key === 'ansi16') { + key = 'ansi'; + } + if ('ansi16' in suite) { styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json index 432ed81f2..65edb48c3 100644 --- a/node_modules/ansi-styles/package.json +++ b/node_modules/ansi-styles/package.json @@ -1,6 +1,6 @@ { "name": "ansi-styles", - "version": "3.2.0", + "version": "3.2.1", "description": "ANSI escape codes for styling strings in the terminal", "license": "MIT", "repository": "chalk/ansi-styles", @@ -13,7 +13,8 @@ "node": ">=4" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" }, "files": [ "index.js" @@ -46,6 +47,7 @@ "devDependencies": { "ava": "*", "babel-polyfill": "^6.23.0", + "svg-term-cli": "^2.1.1", "xo": "*" }, "ava": { diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md index dce368742..3158e2df5 100644 --- a/node_modules/ansi-styles/readme.md +++ b/node_modules/ansi-styles/readme.md @@ -4,7 +4,7 @@ You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - +<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> ## Install |