main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | // Generated by CoffeeScript 2.5.1
|
---|
4 | var codes, styles;
|
---|
5 | module.exports = styles = {};
|
---|
6 | styles.codes = codes = {
|
---|
7 | 'none': 0,
|
---|
8 | 'black': 30,
|
---|
9 | 'red': 31,
|
---|
10 | 'green': 32,
|
---|
11 | 'yellow': 33,
|
---|
12 | 'blue': 34,
|
---|
13 | 'magenta': 35,
|
---|
14 | 'cyan': 36,
|
---|
15 | 'white': 37,
|
---|
16 | 'grey': 90,
|
---|
17 | 'bright-red': 91,
|
---|
18 | 'bright-green': 92,
|
---|
19 | 'bright-yellow': 93,
|
---|
20 | 'bright-blue': 94,
|
---|
21 | 'bright-magenta': 95,
|
---|
22 | 'bright-cyan': 96,
|
---|
23 | 'bright-white': 97,
|
---|
24 | 'bg-black': 40,
|
---|
25 | 'bg-red': 41,
|
---|
26 | 'bg-green': 42,
|
---|
27 | 'bg-yellow': 43,
|
---|
28 | 'bg-blue': 44,
|
---|
29 | 'bg-magenta': 45,
|
---|
30 | 'bg-cyan': 46,
|
---|
31 | 'bg-white': 47,
|
---|
32 | 'bg-grey': 100,
|
---|
33 | 'bg-bright-red': 101,
|
---|
34 | 'bg-bright-green': 102,
|
---|
35 | 'bg-bright-yellow': 103,
|
---|
36 | 'bg-bright-blue': 104,
|
---|
37 | 'bg-bright-magenta': 105,
|
---|
38 | 'bg-bright-cyan': 106,
|
---|
39 | 'bg-bright-white': 107
|
---|
40 | };
|
---|
41 |
|
---|
42 | styles.color = function (str) {
|
---|
43 | var code;
|
---|
44 |
|
---|
45 | if (str === 'none') {
|
---|
46 | return '';
|
---|
47 | }
|
---|
48 |
|
---|
49 | code = codes[str];
|
---|
50 |
|
---|
51 | if (code == null) {
|
---|
52 | throw Error("Unknown color `".concat(str, "`"));
|
---|
53 | }
|
---|
54 |
|
---|
55 | return "\x1b[" + code + "m";
|
---|
56 | };
|
---|
57 |
|
---|
58 | styles.bg = function (str) {
|
---|
59 | var code;
|
---|
60 |
|
---|
61 | if (str === 'none') {
|
---|
62 | return '';
|
---|
63 | }
|
---|
64 |
|
---|
65 | code = codes['bg-' + str];
|
---|
66 |
|
---|
67 | if (code == null) {
|
---|
68 | throw Error("Unknown bg color `".concat(str, "`"));
|
---|
69 | }
|
---|
70 |
|
---|
71 | return "\x1B[" + code + "m";
|
---|
72 | };
|
---|
73 |
|
---|
74 | styles.none = function (str) {
|
---|
75 | return "\x1B[" + codes.none + "m";
|
---|
76 | }; |
---|
Note:
See
TracBrowser
for help on using the repository browser.