Skip to content

Commit e258d4a

Browse files
authoredApr 22, 2020
Merge branch 'master' into source-maps
2 parents 412c414 + 3e2d7cd commit e258d4a

File tree

6 files changed

+401
-290
lines changed

6 files changed

+401
-290
lines changed
 

‎.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lib
2+
coverage

‎bin/ansi-to-html

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/usr/bin/env node
2+
'use strict';
23
require('../lib/cli.js');

‎package-lock.json

+378-284
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"build": "babel src --source-maps --out-dir lib",
1111
"build:watch": "babel src --source-maps --out-dir lib --watch",
12-
"lint": "eslint src test",
12+
"lint": "eslint .",
1313
"test": "nyc mocha --reporter tap",
1414
"test:watch": "mocha --reporter tap --watch ./test ./"
1515
},
@@ -85,11 +85,11 @@
8585
"license": "MIT",
8686
"devDependencies": {
8787
"@babel/cli": "^7.8.4",
88-
"@babel/core": "^7.8.7",
89-
"@babel/preset-env": "^7.8.7",
88+
"@babel/core": "^7.9.0",
89+
"@babel/preset-env": "^7.9.5",
9090
"chai": "~4.2.0",
9191
"eslint": "^6.8.0",
92-
"mocha": "^7.1.0",
92+
"mocha": "^7.1.1",
9393
"nyc": "^15.0.1"
9494
},
9595
"dependencies": {

‎src/ansi_to_html.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function pushTag(stack, tag, style) {
272272

273273
stack.push(tag);
274274

275-
return ['<' + tag, (style ? ' style="' + style + '"' : void 0), '>'].join('');
275+
return `<${tag}${style ? ` style="${style}"` : ''}>`;
276276
}
277277

278278
/**

‎src/cli.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
'use strict';
22
/* eslint no-console:0 */
3-
const help = '\nuasge: ansi-to-html [options] [file]\n \nfile: The file to display or stdin\n \noptions: \n \n -f, --fg The background color used for resets (#000)\n -b, --bg The foreground color used for resets (#FFF)\n -n, --newline Convert newline characters to <br/> (false)\n -x, --escapeXML Generate XML entities (false)\n -v, --version Print version\n -h, --help Print help\n ';
3+
const help = `
4+
usage: ansi-to-html [options] [file]
5+
6+
file: The file to display or stdin
7+
8+
options:
9+
10+
-f, --fg The background color used for resets (#000)
11+
-b, --bg The foreground color used for resets (#FFF)
12+
-n, --newline Convert newline characters to <br/> (false)
13+
-x, --escapeXML Generate XML entities (false)
14+
-v, --version Print version
15+
-h, --help Print help
16+
`;
17+
418
const args = {
519
stream: true
620
};

0 commit comments

Comments
 (0)
Please sign in to comment.