Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit df056bd

Browse files
koddssonkeithamus
andcommitted
Generate custom-element-manifest and vscode html data
Co-authored-by: Keith Cirkel <[email protected]>
1 parent bdf0b35 commit df056bd

File tree

4 files changed

+111
-1
lines changed

4 files changed

+111
-1
lines changed

custom-elements-manifest.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {generateCustomData} from 'cem-plugin-vs-code-custom-data-generator'
2+
3+
export default {
4+
packagejson: true,
5+
globs: ['src/index.ts'],
6+
plugins: [
7+
generateCustomData()
8+
]
9+
}

custom-elements.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"readme": "",
4+
"modules": [
5+
{
6+
"kind": "javascript-module",
7+
"path": "src/index.ts",
8+
"declarations": [
9+
{
10+
"kind": "class",
11+
"description": "",
12+
"name": "DetailsDialogElement",
13+
"members": [
14+
{
15+
"kind": "field",
16+
"name": "CLOSE_ATTR",
17+
"static": true
18+
},
19+
{
20+
"kind": "field",
21+
"name": "CLOSE_SELECTOR",
22+
"static": true
23+
},
24+
{
25+
"kind": "field",
26+
"name": "src",
27+
"type": {
28+
"text": "string | null"
29+
}
30+
},
31+
{
32+
"kind": "field",
33+
"name": "preload",
34+
"type": {
35+
"text": "boolean"
36+
}
37+
},
38+
{
39+
"kind": "method",
40+
"name": "toggle",
41+
"return": {
42+
"type": {
43+
"text": "void"
44+
}
45+
},
46+
"parameters": [
47+
{
48+
"name": "open",
49+
"type": {
50+
"text": "boolean"
51+
}
52+
}
53+
]
54+
}
55+
],
56+
"attributes": [
57+
{
58+
"name": "src"
59+
},
60+
{
61+
"name": "preload"
62+
}
63+
],
64+
"superclass": {
65+
"name": "HTMLElement"
66+
},
67+
"tagName": "details-dialog",
68+
"customElement": true
69+
}
70+
],
71+
"exports": [
72+
{
73+
"kind": "js",
74+
"name": "default",
75+
"declaration": {
76+
"name": "DetailsDialogElement",
77+
"module": "src/index.ts"
78+
}
79+
},
80+
{
81+
"kind": "custom-element-definition",
82+
"name": "details-dialog",
83+
"declaration": {
84+
"name": "DetailsDialogElement",
85+
"module": "src/index.ts"
86+
}
87+
}
88+
]
89+
}
90+
]
91+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
},
4545
"eslintIgnore": [
4646
"dist/"
47-
]
47+
],
48+
"customElements": "custom-elements.json"
4849
}

vscode.html-custom-data.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tags": [
3+
{
4+
"name": "details-dialog",
5+
"description": "",
6+
"attributes": [{ "name": "src" }, { "name": "preload" }]
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)