forked from IonicaBizau/anser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
93 lines (93 loc) · 2.6 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"name": "anser",
"version": "2.1.0",
"description": "A low level parser for ANSI sequences.",
"keywords": [
"ansi",
"html"
],
"author": "Ionică Bizău <[email protected]> (https://ionicabizau.net)",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "git://github.com/IonicaBizau/anser.git"
},
"bugs": {
"url": "http://github.com/IonicaBizau/anser/issues"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "*",
"should": "*",
"jshint": "*",
"jslint": "*"
},
"homepage": "https://github.com/IonicaBizau/anser#readme",
"directories": {
"example": "examples",
"test": "test"
},
"blah": {
"description": [
{
"h2": ":rocket: Features"
},
{
"ul": [
"Converts text containing [ANSI color escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) into equivalent HTML elements.",
"Allows converting the input into JSON output.",
"HTML escaping",
"Converts links into HTML elements",
"Friendly APIs to use with virtual dom libraries"
]
}
],
"example": [
"When using **TypeScript** without --esModuleInterop enabled you can do the following:",
{
"code": {
"content": [
"import Anser = require('anser');",
"const txt = \"\\u001b[38;5;196mHello\\u001b[39m \\u001b[48;5;226mWorld\\u001b[49m\";",
"console.log(Anser.ansiToHtml(txt));",
"// <span style=\"color:rgb(255, 0, 0)\">Hello</span> <span style=\"background-color:rgb(255, 255, 0)\">World</span>"
],
"language": "ts"
}
},
"Or with --esModuleInterop enabled you can do the following:",
{
"code": {
"content": [
"import Anser from 'anser';",
"const txt = \"\\u001b[38;5;196mHello\\u001b[39m \\u001b[48;5;226mWorld\\u001b[49m\";",
"console.log(Anser.ansiToHtml(txt));",
"// <span style=\"color:rgb(255, 0, 0)\">Hello</span> <span style=\"background-color:rgb(255, 255, 0)\">World</span>"
],
"language": "ts"
}
}
],
"thanks": "This project is highly based on [`ansi_up`](https://github.com/drudru/ansi_up), by [@drudru](https://github.com/drudru/). Thanks! :cake:"
},
"license": "MIT",
"dependencies": {},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"scripts/",
"resources/",
"menu/",
"cli.js",
"index.js",
"bloggify.js",
"bloggify.json",
"bloggify/"
]
}