Skip to content

Commit

Permalink
feat: ✨ Added custom elements manifest and web types generation
Browse files Browse the repository at this point in the history
  • Loading branch information
maicol07 committed Aug 14, 2024
1 parent b8f362a commit c5482b7
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
web-types.json
node_modules
*.js
!web-test-runner.config.js
Expand Down
172 changes: 164 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 23 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"update-docs": "wireit",
"update-size": "wireit"
},
"customElement": "custom-elements.json",
"type": "module",
"files": [
"**/*.js",
Expand All @@ -41,6 +42,8 @@
"**/*.scss",
"**/*.css",
"**/*.css.map",
"custom-elements.json",
"web-types.json",
"!web-test-runner.config.js",
"!commitlint.config.js",
"!**/test/**",
Expand All @@ -52,21 +55,22 @@
"testing/harness.{js,js.map,d.ts}",
"testing/transform-pseudo-classes.{js,js.map,d.ts}"
],
"workspaces": [
"catalog"
],
"workspaces": ["catalog"],
"dependencies": {
"lit": "^2.7.4 || ^3.0.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@lit-labs/analyzer": "^0.12.1",
"@lit-labs/analyzer": "npm:@maicol07/[email protected]",
"@lit-labs/gen-manifest": "npm:@maicol07/lit-labs-gen-manifest",
"@rollup/plugin-multi-entry": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@types/jasmine": "^4.0.3",
"@web/test-runner": "^0.18.2",
"@web/test-runner-playwright": "^0.9.0",
"custom-element-jet-brains-integration": "^1.6.2",
"custom-elements-manifest-inheritance": "^1.1.1",
"jasmine": "^4.5.0",
"rollup": "^2.79.1",
"sass": "^1.52.3",
Expand All @@ -77,9 +81,7 @@
},
"wireit": {
"build": {
"dependencies": [
"build:ts"
]
"dependencies": ["build:ts"]
},
"build:ts": {
"command": "tsc --pretty",
Expand All @@ -103,51 +105,27 @@
"!scripts/"
],
"clean": "if-file-deleted",
"dependencies": [
"build:css-to-ts"
]
"dependencies": ["build:css-to-ts"]
},
"build:css-to-ts": {
"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",
"files": [
"**/*-styles.css",
"!catalog/"
],
"output": [
"**/*-styles.ts",
"!catalog/"
],
"dependencies": [
"build:scripts",
"build:sass"
]
"files": ["**/*-styles.css", "!catalog/"],
"output": ["**/*-styles.ts", "!catalog/"],
"dependencies": ["build:scripts", "build:sass"]
},
"build:sass": {
"command": "sass --style=compressed --load-path=node_modules --load-path=node_modules/sass-true/sass $(ls -d */ | grep -vE 'node_modules|catalog')",
"files": [
"**/*.scss",
"!catalog/"
],
"output": [
"**/*.css",
"**/*.css.map",
"!catalog/"
]
"files": ["**/*.scss", "!catalog/"],
"output": ["**/*.css", "**/*.css.map", "!catalog/"]
},
"test": {
"command": "wtr",
"dependencies": [
"build:ts"
],
"files": [
"web-test-runner.config.js"
],
"dependencies": ["build:ts"],
"files": ["web-test-runner.config.js"],
"output": []
},
"build:catalog": {
"dependencies": [
"./catalog:build:prod"
]
"dependencies": ["./catalog:build:prod"]
},
"build:scripts": {
"command": "tsc -b scripts/tsconfig.json --pretty",
Expand Down Expand Up @@ -176,17 +154,13 @@
"!scripts/",
"scripts/analyzer/update-docs.js"
],
"output": [],
"dependencies": [
"build:scripts"
]
"output": ["custom-elements.json", "web-types.json"],
"dependencies": ["build:scripts"]
},
"update-size": {
"command": "node scripts/size/update-size.js",
"dependencies": [
"build:scripts",
"build"
]
"dependencies": ["build:scripts", "build"]
}
}
},
"web-types": "./web-types.json"
}
Loading

0 comments on commit c5482b7

Please sign in to comment.