Skip to content

Commit 13d88ec

Browse files
authored
Add automated job to update data (#15)
1 parent c632be2 commit 13d88ec

File tree

10 files changed

+243
-147
lines changed

10 files changed

+243
-147
lines changed

.github/workflows/update.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# “At 00:00 on day-of-month 1.” https://crontab.guru/#0_0_1_*_*
7+
- cron: "0 0 1 * *"
8+
9+
jobs:
10+
update:
11+
if: github.event_name != 'schedule' || github.repository == 'sindresorhus/html-tags'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
- run: npm install
20+
- run: npm run build
21+
- uses: peter-evans/create-pull-request@v7
22+
with:
23+
commit-message: Update
24+
branch: automated-update
25+
branch-suffix: timestamp
26+
title: Update

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
yarn.lock
3+
.cache

html-tags-void.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export type VoidHtmlTags =
2+
| 'area'
3+
| 'base'
4+
| 'br'
5+
| 'col'
6+
| 'embed'
7+
| 'hr'
8+
| 'img'
9+
| 'input'
10+
| 'link'
11+
| 'meta'
12+
| 'source'
13+
| 'track'
14+
| 'wbr';

html-tags-void.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"img",
99
"input",
1010
"link",
11-
"menuitem",
1211
"meta",
13-
"param",
1412
"source",
1513
"track",
1614
"wbr"

html-tags.d.ts

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
export type HtmlTags =
2+
| 'a'
3+
| 'abbr'
4+
| 'address'
5+
| 'area'
6+
| 'article'
7+
| 'aside'
8+
| 'audio'
9+
| 'b'
10+
| 'base'
11+
| 'bdi'
12+
| 'bdo'
13+
| 'blockquote'
14+
| 'body'
15+
| 'br'
16+
| 'button'
17+
| 'canvas'
18+
| 'caption'
19+
| 'cite'
20+
| 'code'
21+
| 'col'
22+
| 'colgroup'
23+
| 'data'
24+
| 'datalist'
25+
| 'dd'
26+
| 'del'
27+
| 'details'
28+
| 'dfn'
29+
| 'dialog'
30+
| 'div'
31+
| 'dl'
32+
| 'dt'
33+
| 'em'
34+
| 'embed'
35+
| 'fieldset'
36+
| 'figcaption'
37+
| 'figure'
38+
| 'footer'
39+
| 'form'
40+
| 'h1'
41+
| 'h2'
42+
| 'h3'
43+
| 'h4'
44+
| 'h5'
45+
| 'h6'
46+
| 'head'
47+
| 'header'
48+
| 'hgroup'
49+
| 'hr'
50+
| 'html'
51+
| 'i'
52+
| 'iframe'
53+
| 'img'
54+
| 'input'
55+
| 'ins'
56+
| 'kbd'
57+
| 'label'
58+
| 'legend'
59+
| 'li'
60+
| 'link'
61+
| 'main'
62+
| 'map'
63+
| 'mark'
64+
| 'math'
65+
| 'menu'
66+
| 'meta'
67+
| 'meter'
68+
| 'nav'
69+
| 'noscript'
70+
| 'object'
71+
| 'ol'
72+
| 'optgroup'
73+
| 'option'
74+
| 'output'
75+
| 'p'
76+
| 'picture'
77+
| 'pre'
78+
| 'progress'
79+
| 'q'
80+
| 'rp'
81+
| 'rt'
82+
| 'ruby'
83+
| 's'
84+
| 'samp'
85+
| 'script'
86+
| 'search'
87+
| 'section'
88+
| 'select'
89+
| 'slot'
90+
| 'small'
91+
| 'source'
92+
| 'span'
93+
| 'strong'
94+
| 'style'
95+
| 'sub'
96+
| 'summary'
97+
| 'sup'
98+
| 'svg'
99+
| 'table'
100+
| 'tbody'
101+
| 'td'
102+
| 'template'
103+
| 'textarea'
104+
| 'tfoot'
105+
| 'th'
106+
| 'thead'
107+
| 'time'
108+
| 'title'
109+
| 'tr'
110+
| 'track'
111+
| 'u'
112+
| 'ul'
113+
| 'var'
114+
| 'video'
115+
| 'wbr';

html-tags.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"mark",
6464
"math",
6565
"menu",
66-
"menuitem",
6766
"meta",
6867
"meter",
6968
"nav",
@@ -74,15 +73,12 @@
7473
"option",
7574
"output",
7675
"p",
77-
"param",
7876
"picture",
7977
"pre",
8078
"progress",
8179
"q",
82-
"rb",
8380
"rp",
8481
"rt",
85-
"rtc",
8682
"ruby",
8783
"s",
8884
"samp",

index.d.ts

Lines changed: 5 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,5 @@
1-
export type HtmlTags =
2-
| 'a'
3-
| 'abbr'
4-
| 'address'
5-
| 'area'
6-
| 'article'
7-
| 'aside'
8-
| 'audio'
9-
| 'b'
10-
| 'base'
11-
| 'bdi'
12-
| 'bdo'
13-
| 'blockquote'
14-
| 'body'
15-
| 'br'
16-
| 'button'
17-
| 'canvas'
18-
| 'caption'
19-
| 'cite'
20-
| 'code'
21-
| 'col'
22-
| 'colgroup'
23-
| 'data'
24-
| 'datalist'
25-
| 'dd'
26-
| 'del'
27-
| 'details'
28-
| 'dfn'
29-
| 'dialog'
30-
| 'div'
31-
| 'dl'
32-
| 'dt'
33-
| 'em'
34-
| 'embed'
35-
| 'fieldset'
36-
| 'figcaption'
37-
| 'figure'
38-
| 'footer'
39-
| 'form'
40-
| 'h1'
41-
| 'h2'
42-
| 'h3'
43-
| 'h4'
44-
| 'h5'
45-
| 'h6'
46-
| 'head'
47-
| 'header'
48-
| 'hgroup'
49-
| 'hr'
50-
| 'html'
51-
| 'i'
52-
| 'iframe'
53-
| 'img'
54-
| 'input'
55-
| 'ins'
56-
| 'kbd'
57-
| 'label'
58-
| 'legend'
59-
| 'li'
60-
| 'link'
61-
| 'main'
62-
| 'map'
63-
| 'mark'
64-
| 'math'
65-
| 'menu'
66-
| 'menuitem'
67-
| 'meta'
68-
| 'meter'
69-
| 'nav'
70-
| 'noscript'
71-
| 'object'
72-
| 'ol'
73-
| 'optgroup'
74-
| 'option'
75-
| 'output'
76-
| 'p'
77-
| 'param'
78-
| 'picture'
79-
| 'pre'
80-
| 'progress'
81-
| 'q'
82-
| 'rb'
83-
| 'rp'
84-
| 'rt'
85-
| 'rtc'
86-
| 'ruby'
87-
| 's'
88-
| 'samp'
89-
| 'script'
90-
| 'search'
91-
| 'section'
92-
| 'select'
93-
| 'slot'
94-
| 'small'
95-
| 'source'
96-
| 'span'
97-
| 'strong'
98-
| 'style'
99-
| 'sub'
100-
| 'summary'
101-
| 'sup'
102-
| 'svg'
103-
| 'table'
104-
| 'tbody'
105-
| 'td'
106-
| 'template'
107-
| 'textarea'
108-
| 'tfoot'
109-
| 'th'
110-
| 'thead'
111-
| 'time'
112-
| 'title'
113-
| 'tr'
114-
| 'track'
115-
| 'u'
116-
| 'ul'
117-
| 'var'
118-
| 'video'
119-
| 'wbr';
120-
121-
export type VoidHtmlTags =
122-
| 'area'
123-
| 'base'
124-
| 'br'
125-
| 'col'
126-
| 'embed'
127-
| 'hr'
128-
| 'img'
129-
| 'input'
130-
| 'link'
131-
| 'menuitem'
132-
| 'meta'
133-
| 'param'
134-
| 'source'
135-
| 'track'
136-
| 'wbr';
1+
import type {HtmlTags} from './html-tags.js';
2+
import type {VoidHtmlTags} from './html-tags-void.js';
1373

1384
/**
1395
List of standard HTML tags.
@@ -162,3 +28,6 @@ console.log(voidHtmlTags);
16228
```
16329
*/
16430
export const voidHtmlTags: readonly VoidHtmlTags[];
31+
32+
export type {HtmlTags} from './html-tags.js';
33+
export type {VoidHtmlTags} from './html-tags-void.js';

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@
2121
},
2222
"scripts": {
2323
"//test": "xo && ava",
24-
"test": "ava"
24+
"test": "ava",
25+
"build": "node scripts/build.js"
2526
},
2627
"files": [
2728
"index.js",
28-
"index.d.ts",
2929
"html-tags.json",
30-
"html-tags-void.json"
30+
"html-tags-void.json",
31+
"index.d.ts",
32+
"html-tags.d.ts",
33+
"html-tags-void.d.ts"
3134
],
3235
"keywords": [
3336
"html",
@@ -42,6 +45,7 @@
4245
],
4346
"devDependencies": {
4447
"ava": "^6.1.2",
45-
"xo": "^0.58.0"
48+
"cheerio": "^1.0.0",
49+
"xo": "^0.60.0"
4650
}
4751
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
It's just a couple of JSON files that can be used in any environment.
66

7-
It intentionally leaves out obsolete tags.
7+
It intentionally leaves out [obsolete tags](https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features).
88

99
## Install
1010

0 commit comments

Comments
 (0)