ansi-styles 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +25 -4
  2. package/package.json +4 -3
  3. package/readme.md +17 -0
package/index.js CHANGED
@@ -38,7 +38,16 @@ function assembleStyles() {
38
38
  magenta: [35, 39],
39
39
  cyan: [36, 39],
40
40
  white: [37, 39],
41
- gray: [90, 39]
41
+ gray: [90, 39],
42
+
43
+ // Bright color
44
+ redBright: [91, 39],
45
+ greenBright: [92, 39],
46
+ yellowBright: [93, 39],
47
+ blueBright: [94, 39],
48
+ magentaBright: [95, 39],
49
+ cyanBright: [96, 39],
50
+ whiteBright: [97, 39]
42
51
  },
43
52
  bgColor: {
44
53
  bgBlack: [40, 49],
@@ -48,11 +57,21 @@ function assembleStyles() {
48
57
  bgBlue: [44, 49],
49
58
  bgMagenta: [45, 49],
50
59
  bgCyan: [46, 49],
51
- bgWhite: [47, 49]
60
+ bgWhite: [47, 49],
61
+
62
+ // Bright color
63
+ bgBlackBright: [100, 49],
64
+ bgRedBright: [101, 49],
65
+ bgGreenBright: [102, 49],
66
+ bgYellowBright: [103, 49],
67
+ bgBlueBright: [104, 49],
68
+ bgMagentaBright: [105, 49],
69
+ bgCyanBright: [106, 49],
70
+ bgWhiteBright: [107, 49]
52
71
  }
53
72
  };
54
73
 
55
- // fix humans
74
+ // Fix humans
56
75
  styles.color.grey = styles.color.gray;
57
76
 
58
77
  Object.keys(styles).forEach(groupName => {
@@ -61,10 +80,12 @@ function assembleStyles() {
61
80
  Object.keys(group).forEach(styleName => {
62
81
  const style = group[styleName];
63
82
 
64
- styles[styleName] = group[styleName] = {
83
+ styles[styleName] = {
65
84
  open: `\u001B[${style[0]}m`,
66
85
  close: `\u001B[${style[1]}m`
67
86
  };
87
+
88
+ group[styleName] = styles[styleName];
68
89
  });
69
90
 
70
91
  Object.defineProperty(styles, groupName, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ansi-styles",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "ANSI escape codes for styling strings in the terminal",
5
5
  "license": "MIT",
6
6
  "repository": "chalk/ansi-styles",
@@ -50,9 +50,10 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "ava": "*",
53
+ "babel-polyfill": "^6.23.0",
53
54
  "xo": "*"
54
55
  },
55
- "xo": {
56
- "esnext": true
56
+ "ava": {
57
+ "require": "babel-polyfill"
57
58
  }
58
59
  }
package/readme.md CHANGED
@@ -62,6 +62,15 @@ Each style has an `open` and `close` property.
62
62
  - `white`
63
63
  - `gray`
64
64
 
65
+ - `blackBright`
66
+ - `redBright`
67
+ - `greenBright`
68
+ - `yellowBright`
69
+ - `blueBright`
70
+ - `magentaBright`
71
+ - `cyanBright`
72
+ - `whiteBright`
73
+
65
74
  ### Background colors
66
75
 
67
76
  - `bgBlack`
@@ -73,6 +82,14 @@ Each style has an `open` and `close` property.
73
82
  - `bgCyan`
74
83
  - `bgWhite`
75
84
 
85
+ - `bgBlackBright`
86
+ - `bgRedBright`
87
+ - `bgGreenBright`
88
+ - `bgYellowBright`
89
+ - `bgBlueBright`
90
+ - `bgMagentaBright`
91
+ - `bgCyanBright`
92
+ - `bgWhiteBright`
76
93
 
77
94
  ## Advanced usage
78
95