Skip to content

Commit 12b6a4d

Browse files
Upgrade deps
1 parent 32988d6 commit 12b6a4d

File tree

8 files changed

+70
-51
lines changed

8 files changed

+70
-51
lines changed

examples/lists.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
<ul>
22
<li>Coffee</li>
33
<li>Tea</li>
4-
<li>Milk
4+
<li>
5+
Milk
56
<ul>
67
<li>Coffee</li>
78
<li>Tea</li>
8-
<li>Milk
9+
<li>
10+
Milk
911
<ul>
1012
<li>Coffee</li>
1113
<li>Tea</li>
12-
<li>Milk
14+
<li>
15+
Milk
1316
<ul>
1417
<li>Coffee</li>
1518
<li>Tea</li>
16-
<li>Milk
19+
<li>
20+
Milk
1721
<ul>
1822
<li>Coffee</li>
1923
<li>Tea</li>
@@ -53,7 +57,7 @@
5357
</ol>
5458

5559
<ol type="I" start="1">
56-
<li>Coffee</li>
57-
<li>Tea</li>
60+
<li><input type="radio" checked /> Coffee</li>
61+
<li><input type="checkbox" checked /> Tea</li>
5862
<li>Milk</li>
59-
</ol>
63+
</ol>

examples/pre.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<pre><p>qwe</p></pre>
1+
<pre><code>
2+
zpm load @gist/user/hash,origin:https: //another-site/file.zsh # This file will be downloaded instead of https: //another-site/file.zsh # This file will be downloaded instead of
3+
zpm load @gist/user/hash,origin:https: //another-site/file.zsh # This file will be downloaded instead of https: //another-site/file.zsh # This file will be downloaded instead of
4+
zpm load @gist/user/hash,origin:https: //another-site/file.zsh # This file will be downloaded instead of https: //another-site/file.zsh # This file will be downloaded instead of
5+
6+
</code></pre>

lib/tag-helpers/block-tag.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import { renderTag } from '../utils/render-tag.js';
66
import wrapLineWidth from '../wrap-line-width.js';
77

88
/**
9-
* @param wrapper
10-
* @param localContext
9+
* @param wrapper - {Function}.
10+
* @param localContext - {object}.
11+
* @returns {Function}
1112
*/
1213
export function blockTag(wrapper, localContext) {
1314
return (tag, context) => {
@@ -94,7 +95,7 @@ export function blockTag(wrapper, localContext) {
9495
? value.block.marginBottom
9596
: bottomBlock,
9697
type: 'block',
97-
// nodeName: tag.nodeName,
98+
nodeName: tag.nodeName,
9899
};
99100
};
100101
}

lib/tags.js

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { blockTag } from './tag-helpers/block-tag.js';
2-
import { textNode } from './tag-helpers/text-node.js';
3-
import { a } from './tags/a.js';
4-
import { abbr, acronym, dfn } from './tags/abbr.js';
5-
import { address } from './tags/address.js';
1+
import { blockTag } from "./tag-helpers/block-tag.js";
2+
import { textNode } from "./tag-helpers/text-node.js";
3+
import { a } from "./tags/a.js";
4+
import { abbr, acronym, dfn } from "./tags/abbr.js";
5+
import { address } from "./tags/address.js";
66
import {
77
article,
88
aside,
9+
blink,
910
div,
1011
figcaption,
1112
footer,
@@ -21,26 +22,24 @@ import {
2122
section,
2223
span,
2324
title,
24-
} from './tags/base-tags.js';
25-
import { blockquote } from './tags/blockquote.js';
26-
import { br } from './tags/br.js';
27-
import { center } from './tags/center.js';
28-
import { code, pre } from './tags/code.js';
29-
import { dd, dl, dt } from './tags/definitions.js';
30-
import { details } from './tags/details.js';
31-
import { body, html } from './tags/document.js';
32-
import { fieldset } from './tags/fieldset.js';
33-
import { figure } from './tags/figure.js';
34-
import { font } from './tags/font.js';
35-
import {
36-
h1, h2, h3, h4, h5, h6,
37-
} from './tags/headers.js';
38-
import { hr } from './tags/hr.js';
39-
import { img } from './tags/img.js';
40-
import { button, input, output } from './tags/inputs.js';
41-
import { li, ol, ul } from './tags/list.js';
42-
import { progress } from './tags/progress.js';
43-
import { caption, table } from './tags/table.js';
25+
} from "./tags/base-tags.js";
26+
import { blockquote } from "./tags/blockquote.js";
27+
import { br } from "./tags/br.js";
28+
import { center } from "./tags/center.js";
29+
import { code, pre } from "./tags/code.js";
30+
import { dd, dl, dt } from "./tags/definitions.js";
31+
import { details } from "./tags/details.js";
32+
import { body, html } from "./tags/document.js";
33+
import { fieldset } from "./tags/fieldset.js";
34+
import { figure } from "./tags/figure.js";
35+
import { font } from "./tags/font.js";
36+
import { h1, h2, h3, h4, h5, h6 } from "./tags/headers.js";
37+
import { hr } from "./tags/hr.js";
38+
import { img } from "./tags/img.js";
39+
import { button, input, output } from "./tags/inputs.js";
40+
import { li, ol, ul } from "./tags/list.js";
41+
import { progress } from "./tags/progress.js";
42+
import { caption, table } from "./tags/table.js";
4443
import {
4544
b,
4645
big,
@@ -69,12 +68,13 @@ import {
6968
underline,
7069
variableTag,
7170
wbr,
72-
} from './tags/text-styles.js';
71+
} from "./tags/text-styles.js";
7372
import {
7473
applet,
7574
area,
7675
audio,
7776
base,
77+
basefont,
7878
bgsound,
7979
embed,
8080
keygen,
@@ -93,13 +93,13 @@ import {
9393
template,
9494
track,
9595
video,
96-
} from './tags/void.js';
96+
} from "./tags/void.js";
9797

9898
const __text = textNode;
9999

100100
//
101101
export default {
102-
'#text': __text,
102+
"#text": __text,
103103
a,
104104
abbr,
105105
acronym,
@@ -184,6 +184,7 @@ export default {
184184
select,
185185
source,
186186
span,
187+
blink,
187188
strike,
188189
strikethrough,
189190
strong,
@@ -203,4 +204,5 @@ export default {
203204
var: variableTag,
204205
video,
205206
wbr,
207+
basefont,
206208
};

lib/tags/base-tags.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const title = blockTag((value) => boxen(chalk.blue.bold(value), {
2323

2424
export const span = inline;
2525
export const label = inline;
26+
export const blink = inline;
2627

2728
export const p = blockWithNewlines;
2829

lib/tags/code.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ export const code = (tag, context) => inlineTag((value, tag) => {
4646
pad,
4747
true,
4848
)(
49-
wrapAnsi(codeLine, context.lineWidth - codeLinesLength - 1, { trim: false }),
49+
wrapAnsi(codeLine, context.lineWidth - pad.length - 1, { trim: false }),
5050
)}`,
5151
);
5252

53-
return codeContent.join('\n');
53+
return indentify(' ')(codeContent.join('\n'));
5454
})(tag, context);
5555

56-
export const pre = (tag, context) => blockTag((value, tag) => indentify(' ')(value), { marginTop: 2, marginBottom: 2 })(
56+
export const pre = (tag, context) => blockTag((value, tag) => value, { marginTop: 2, marginBottom: 2 })(
5757
tag,
5858
{ ...context, pre: true, lineWidth: context.lineWidth - 10 },
5959
);

lib/tags/void.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ export {
33
voidTag as area,
44
voidTag as audio,
55
voidTag as base,
6+
voidTag as basefont,
67
voidTag as bgsound,
8+
voidTag as canvas,
79
voidTag as embed,
10+
voidTag as iframe,
811
voidTag as keygen,
912
voidTag as link,
1013
voidTag as map,
1114
voidTag as meta,
1215
voidTag as noscript,
16+
voidTag as object,
1317
voidTag as optgroup,
1418
voidTag as option,
1519
voidTag as param,
@@ -21,4 +25,6 @@ export {
2125
voidTag as template,
2226
voidTag as track,
2327
voidTag as video,
24-
} from '../tag-helpers/void-tag.js';
28+
voidTag as wbr,
29+
voidTag as xmp,
30+
} from "../tag-helpers/void-tag.js";

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"homepage": "https://github.com/horosgrisa/cli-html",
3333
"dependencies": {
3434
"ansi-align": "^3.0.1",
35-
"ansi-escapes": "^5.0.0",
35+
"ansi-escapes": "^6.0.0",
3636
"boxen": "^7.0.0",
3737
"chalk": "^5.0.0",
3838
"change-case": "^4.1.2",
3939
"cli-highlight": "^2.1.11",
40-
"cli-table3": "^0.6.0",
40+
"cli-table3": "^0.6.3",
4141
"color-namer": "^1.4.0",
4242
"compose-function": "^3.0.3",
4343
"concat-stream": "^2.0.0",
@@ -47,24 +47,24 @@
4747
"longest-line": "0.0.3",
4848
"normalize-html-whitespace": "^1.0.0",
4949
"number-to-alphabet": "^1.0.0",
50-
"parse5": "^7.0.0",
50+
"parse5": "^7.1.1",
5151
"romanize": "^1.1.1",
52-
"supports-hyperlinks": "^2.2.0",
52+
"supports-hyperlinks": "^2.3.0",
5353
"term-size": "^3.0.1",
5454
"wrap-ansi": "^8.0.1"
5555
},
5656
"devDependencies": {
5757
"confusing-browser-globals": "^1.0.11",
58-
"eslint": "^8.5.0",
58+
"eslint": "^8.24.0",
5959
"eslint-config-airbnb-base": "^15.0.0",
6060
"eslint-config-standard-jsdoc": "^9.3.0",
6161
"eslint-plugin-async-await": "0.0.0",
62-
"eslint-plugin-jsdoc": "^39.3.3",
62+
"eslint-plugin-jsdoc": "^39.3.6",
6363
"eslint-plugin-json": "^3.1.0",
6464
"eslint-plugin-no-loops": "^0.3.0",
6565
"eslint-plugin-node": "^11.1.0",
6666
"eslint-plugin-prefer-object-spread": "^1.2.1",
67-
"eslint-plugin-simple-import-sort": "^7.0.0",
68-
"eslint-plugin-unicorn": "^43.0.0"
67+
"eslint-plugin-simple-import-sort": "^8.0.0",
68+
"eslint-plugin-unicorn": "^44.0.0"
6969
}
7070
}

0 commit comments

Comments
 (0)