Skip to content

Commit c5482b7

Browse files
committed
feat: ✨ Added custom elements manifest and web types generation
1 parent b8f362a commit c5482b7

5 files changed

Lines changed: 204 additions & 59 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
web-types.json
12
node_modules
23
*.js
34
!web-test-runner.config.js

package-lock.json

Lines changed: 164 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"update-docs": "wireit",
3434
"update-size": "wireit"
3535
},
36+
"customElement": "custom-elements.json",
3637
"type": "module",
3738
"files": [
3839
"**/*.js",
@@ -41,6 +42,8 @@
4142
"**/*.scss",
4243
"**/*.css",
4344
"**/*.css.map",
45+
"custom-elements.json",
46+
"web-types.json",
4447
"!web-test-runner.config.js",
4548
"!commitlint.config.js",
4649
"!**/test/**",
@@ -52,21 +55,22 @@
5255
"testing/harness.{js,js.map,d.ts}",
5356
"testing/transform-pseudo-classes.{js,js.map,d.ts}"
5457
],
55-
"workspaces": [
56-
"catalog"
57-
],
58+
"workspaces": ["catalog"],
5859
"dependencies": {
5960
"lit": "^2.7.4 || ^3.0.0",
6061
"tslib": "^2.4.0"
6162
},
6263
"devDependencies": {
63-
"@lit-labs/analyzer": "^0.12.1",
64+
"@lit-labs/analyzer": "npm:@maicol07/lit-labs-analyzer@0.13.0-1",
65+
"@lit-labs/gen-manifest": "npm:@maicol07/lit-labs-gen-manifest",
6466
"@rollup/plugin-multi-entry": "^6.0.1",
6567
"@rollup/plugin-node-resolve": "^15.2.3",
6668
"@rollup/plugin-terser": "^0.4.4",
6769
"@types/jasmine": "^4.0.3",
6870
"@web/test-runner": "^0.18.2",
6971
"@web/test-runner-playwright": "^0.9.0",
72+
"custom-element-jet-brains-integration": "^1.6.2",
73+
"custom-elements-manifest-inheritance": "^1.1.1",
7074
"jasmine": "^4.5.0",
7175
"rollup": "^2.79.1",
7276
"sass": "^1.52.3",
@@ -77,9 +81,7 @@
7781
},
7882
"wireit": {
7983
"build": {
80-
"dependencies": [
81-
"build:ts"
82-
]
84+
"dependencies": ["build:ts"]
8385
},
8486
"build:ts": {
8587
"command": "tsc --pretty",
@@ -103,51 +105,27 @@
103105
"!scripts/"
104106
],
105107
"clean": "if-file-deleted",
106-
"dependencies": [
107-
"build:css-to-ts"
108-
]
108+
"dependencies": ["build:css-to-ts"]
109109
},
110110
"build:css-to-ts": {
111111
"command": "find . \\( -path ./.wireit -o -path ./node_modules -o -path ./catalog \\) -prune -o -name '*-styles.css' -print | xargs -L1 node scripts/css-to-ts.js",
112-
"files": [
113-
"**/*-styles.css",
114-
"!catalog/"
115-
],
116-
"output": [
117-
"**/*-styles.ts",
118-
"!catalog/"
119-
],
120-
"dependencies": [
121-
"build:scripts",
122-
"build:sass"
123-
]
112+
"files": ["**/*-styles.css", "!catalog/"],
113+
"output": ["**/*-styles.ts", "!catalog/"],
114+
"dependencies": ["build:scripts", "build:sass"]
124115
},
125116
"build:sass": {
126117
"command": "sass --style=compressed --load-path=node_modules --load-path=node_modules/sass-true/sass $(ls -d */ | grep -vE 'node_modules|catalog')",
127-
"files": [
128-
"**/*.scss",
129-
"!catalog/"
130-
],
131-
"output": [
132-
"**/*.css",
133-
"**/*.css.map",
134-
"!catalog/"
135-
]
118+
"files": ["**/*.scss", "!catalog/"],
119+
"output": ["**/*.css", "**/*.css.map", "!catalog/"]
136120
},
137121
"test": {
138122
"command": "wtr",
139-
"dependencies": [
140-
"build:ts"
141-
],
142-
"files": [
143-
"web-test-runner.config.js"
144-
],
123+
"dependencies": ["build:ts"],
124+
"files": ["web-test-runner.config.js"],
145125
"output": []
146126
},
147127
"build:catalog": {
148-
"dependencies": [
149-
"./catalog:build:prod"
150-
]
128+
"dependencies": ["./catalog:build:prod"]
151129
},
152130
"build:scripts": {
153131
"command": "tsc -b scripts/tsconfig.json --pretty",
@@ -176,17 +154,13 @@
176154
"!scripts/",
177155
"scripts/analyzer/update-docs.js"
178156
],
179-
"output": [],
180-
"dependencies": [
181-
"build:scripts"
182-
]
157+
"output": ["custom-elements.json", "web-types.json"],
158+
"dependencies": ["build:scripts"]
183159
},
184160
"update-size": {
185161
"command": "node scripts/size/update-size.js",
186-
"dependencies": [
187-
"build:scripts",
188-
"build"
189-
]
162+
"dependencies": ["build:scripts", "build"]
190163
}
191-
}
164+
},
165+
"web-types": "./web-types.json"
192166
}

0 commit comments

Comments
 (0)