4 Commits

Author SHA1 Message Date
jaandrle e4e41197b9 🐛 fixes routing 2026-05-20 14:40:47 +02:00
jaandrle 7d6240e28a 🐛 📺 fixes dev server 2026-05-20 14:40:00 +02:00
jaandrle 139b1590ce Uses original router
- it has benefits to use hash properly
2026-04-29 13:40:40 +02:00
jaandrle 3cc11b68de 🎉 2026-04-28 17:16:00 +02:00
46 changed files with 219 additions and 698 deletions
+4 -40
View File
@@ -1,49 +1,13 @@
# CommaFeed Podcasts
<p align="center">
<img width="200" src="./src/assets/logo.svg" alt="CommaFeed Podcasts logo">
<img width="200" src="./assets/logo.svg"></img>
</p>
> **Experimental / WIP** A progressive web application for podcast consumption, powered by [CommaFeed](https://github.com/Athou/commafeed) as the backend.
# CommaFeed Podcasts
**Experimantal/WIP** PWA podcast app. Idea is to use [CommaFeed](https://github.com/Athou/commafeed) as a backend.
## Links
- [Plan](./changelog/PLAN.md), [Task](./changelog/TASK.md)
- [Building scripts](./bs/README.md)
- [![Built with open-wc recommendations](https://img.shields.io/badge/built%20with-open--wc-blue.svg)](https://github.com/open-wc)
- [What is Lit? Lit](https://lit.dev/docs/)
- [@lit-labs/router - npm](https://www.npmjs.com/package/@lit-labs/router)
- [lit-translate - npm](https://www.npmjs.com/package/lit-translate)
## Features
- **PWA** support with offline caching.
- Clientside routing via a lightweight router.
- Dynamic page rendering based on URL parameters (e.g., `/episodes/:id`).
- Built with Lit, TypeScript and OpenWC tooling.
## Getting Started
```bash
npm install
bs/start
```
## Build Scripts
See [bs/README.md](./bs/README.md) for available build and deployment scripts.
## Testing
Tests are written with `@open-wc/testing` (Mocha) / Web Test Runner and follow the `*.test.ts` convention. Run all tests via:
```bash
bs/test
```
## Documentation
- Overall development plan: [docs/dev/PLAN.md](./docs/dev/PLAN.md)
- Overall task board: [docs/dev/TASK.md](./docs/dev/TASK.md)
- App source overview: [src/README.md](./src/README.md)
## Contributing
TBD
<!--
Pull requests are welcome! Please read the contributing guidelines in `CONTRIBUTING.md` (if present) or open an issue to discuss major changes.
-->
## License
[MIT](LICENSE)

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

+2 -4
View File
@@ -9,11 +9,9 @@ isHelp() {
return 1
}
echoReadmeInfo() {
local -r script="bs/${0##*bs/}"
local -r script="bs/${0##*/}"
local info
if ! info="$(grep -A1 "## $script" "$readme" | tail -n1)"; then
info="No info found in $readme for $script"
fi
info="$(grep -A1 "## $script" "$readme" | tail -n1)"
cat <<-EOF
$info
Usage: $script [options]
+4 -10
View File
@@ -4,6 +4,9 @@ This project uses [jaandrle/bs: The simplest possible build system using executa
## Available executables
If it makes sense, arguments are passed to internally used commands (e.g. `tsc`), e. g. `--help`.
### bs/lint
This lints the project using `tsc`.
### bs/test
This lints the project and runs tests using `wtr`.
@@ -16,17 +19,8 @@ This builds the project using `rollup`.
### bs/analyze
This analyze Custom Element manifest using the `@custom-elements-manifest/analyzer`.
### bs/dev/assets
Copies assets using `cp` into proper destination in `.tmp`.
### bs/dev/tsc
Builds typescript files using `tsc`.
### bs/dev/lint
Lints the project using `tsc`.
### bs/npm/lint
Lints projects npm dependencies.
Linted projects npm dependencies.
### bs/npm/update
Updates projects npm dependencies.
+3 -7
View File
@@ -5,12 +5,8 @@ set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3
exit 1;
}
# depends on
declare -r app=(
'src/**/c-*.ts'
'src/**/app-*/index.ts'
'src/index.ts'
)
declare -r cem='node_modules/.bin/custom-elements-manifest'
declare -r app='src/app-cfpodcasts.ts'
declare -r cem='node_modules/.bin/cem'
help(){
if ! isHelp "${@}"; then return 0; fi
@@ -21,7 +17,7 @@ help(){
}
main(){
help "${@}"
$cem analyze --litelement --globs "${app[@]}" "${@}"
$cem analyze --litelement --globs "$app" "${@}"
}
main "${@}"
+2 -4
View File
@@ -5,8 +5,7 @@ set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3
exit 1;
}
# depends on
declare -r tsc='bs/dev/tsc'
declare -r assets='bs/dev/assets'
declare -r lint='bs/lint'
declare -r rollup='node_modules/.bin/rollup'
declare -r analyze='bs/analyze'
declare -r config='rollup.config.js'
@@ -22,8 +21,7 @@ help(){
main(){
help "${@}"
$tsc
$assets
$lint
rm -rf "$dist"
$rollup -c $config "${@}"
$analyze --exclude "$dist"
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3Ml53kvc
. bs/.common || {
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
# depends on
declare -r paths='bs/dev/paths.js'
declare -r assets="$($paths 'src')/**/assets"
declare -r target="$($paths 'tscoutput')"
help(){
if ! isHelp "${@}"; then return 0; fi
echoReadmeInfo
echo
exit 0
}
main(){
help "${@}"
shopt -s globstar nullglob
for dir in $assets; do
cp -r "$dir" "$target/$dir"
done
}
main "${@}"
-44
View File
@@ -1,44 +0,0 @@
#!/bin/env node
import tsconfig from "../../tsconfig.json" with { type: "json" };
export const paths = {
/** code source */
src: "src",
/** code processed by tsc */
tscoutput: tsconfig.compilerOptions.outDir,
/** code processed by tsc and rollup */
dist: "dist",
/** tempral results of tsc, tests, … */
tmp: ".tmp",
};
export default paths;
import { argv, exit } from "node:process";
import { fileURLToPath } from "node:url";
const [ _, script ] = argv;
if (script === fileURLToPath(import.meta.url))
main(argv.slice(2));
function main(args) {
if(args.includes("--help") || args.includes("-h")){
console.log(`
Usage: ${script} [options]
Options:
[type] … if omitted, echo all
`);
exit(0);
}
if(args.length === 0){
console.log(paths);
exit(0);
}
for(const arg of args){
const path = paths[arg];
if(!path){
console.error(`Unknown path: ${arg}`);
exit(1);
}
console.log(path);
}
}
-25
View File
@@ -1,25 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3Ml53kvc
. bs/.common || {
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
# depends on
declare -r tsc='node_modules/.bin/tsc'
declare -r tscAlias='node_modules/.bin/tsc-alias'
help(){
if ! isHelp "${@}"; then return 0; fi
echoReadmeInfo
echo
$tsc --help
$tscAlias --help
exit 0
}
main(){
help "${@}"
$tsc "${@}"
$tscAlias "${@}"
}
main "${@}"
+1 -1
View File
@@ -16,7 +16,7 @@ help(){
}
main(){
help "${@}"
$tsc --noEmit "${@}"
$tsc "${@}"
}
main "${@}"
+4 -6
View File
@@ -4,11 +4,11 @@ set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
# "start:build": "web-dev-server --root-dir dist --app-index index.html --open",
# "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"web-dev-server\""
# depends on
declare -r server='node_modules/.bin/web-dev-server'
declare -r lint='bs/dev/lint'
declare -r tsc='bs/dev/tsc'
declare -r assets='bs/dev/assets'
declare -r lint='bs/lint'
declare -r server_config='web-dev-server.config.js'
help(){
@@ -27,14 +27,12 @@ EOF
main(){
help "${@}"
$lint
local -r target="${1:-./src}" # ./src or ./dist
if [[ "$target" =~ 'dist' ]]; then
# console warns because of config file, use npx serve?
$server "${@}"
else
$assets
$tsc --watch --preserveWatchOutput &
$lint --watch --preserveWatchOutput &
$server "${@}" &
wait
fi
+6 -4
View File
@@ -5,13 +5,15 @@ set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3
exit 1;
}
# depends on
declare -r tsc='bs/dev/tsc'
declare -r wtr='node_modules/.bin/web-test-runner'
declare -r lint='bs/lint'
declare -r wtr='node_modules/.bin/wtr'
help(){
if ! isHelp "${@}"; then return 0; fi
echoReadmeInfo
cat <<EOF
Options:
--watch, -w Runs in watch mode
EOF
$wtr --help
@@ -20,12 +22,12 @@ EOF
main(){
help "$1"
if [[ "$1" != "--watch" ]]; then
$tsc
$lint
$wtr "$@" --coverage
exit
fi
$tsc --watch --preserveWatchOutput &
$lint --watch --preserveWatchOutput &
$wtr "${*}" &
wait
}
-1
View File
@@ -1 +0,0 @@
v1.0.md
-4
View File
@@ -1,4 +0,0 @@
# v1.0.0
- [x] initial setup (`bs`, app structure, …)
- [x] adds routing support
-8
View File
@@ -1,8 +0,0 @@
# Development-related documentation
## [CommaFeed API.md](./CommaFeed\ API.md)
Exported API for [CommaFeed](https://github.com/CommaFeed/CommaFeed).
## Development TODO summary
- [PLAN.md](./PLAN.md): Overall plan for the project.
- [TASK.md](./TASK.md): Converted plan to overview of tasks.
+2 -2
View File
@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="Description" content="Put your description here.">
<link rel="icon" type="image/svg+xml" href="./.tmp/tsc/src/assets/logo.svg">
<link rel="icon" type="image/svg+xml" href="./assets/logo.svg">
<base href="/">
<style>
@@ -23,7 +23,7 @@
<body>
<app-cfpodcasts></app-cfpodcasts>
<script type="module" src="./.tmp/tsc/src/index.js"></script>
<script type="module" src="./out-tsc/src/index.js"></script>
</body>
</html>
+113 -216
View File
@@ -15,7 +15,7 @@
"devDependencies": {
"@custom-elements-manifest/analyzer": "~0.11",
"@open-wc/testing": "~4.0",
"@rollup/plugin-babel": "~7.1",
"@rollup/plugin-babel": "~7.0",
"@rollup/plugin-node-resolve": "~16.0",
"@types/mocha": "~10.0",
"@web/dev-server": "~0.4",
@@ -24,10 +24,9 @@
"@web/test-runner": "~0.20",
"babel-plugin-template-html-minifier": "~4.1",
"deepmerge": "~4.3",
"rollup": "~4.61",
"rollup": "~4.59",
"rollup-plugin-esbuild": "~6.2",
"rollup-plugin-workbox": "~8.1",
"tsc-alias": "~1.8",
"tslib": "~2.8",
"typescript": "~6.0"
}
@@ -2670,15 +2669,14 @@
}
},
"node_modules/@rollup/plugin-babel": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.1.0.tgz",
"integrity": "sha512-h9Y+xYha6p4wKO+FwdiPIkE+eIYCm8MzZPpX1iARIoFBnmKP9CnpT1p9dDf/DTFm6fyN8PmuLyRI5qZgchnitw==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.0.0.tgz",
"integrity": "sha512-NS2+P7v80N3MQqehZEjgpaFb9UyX3URNMW/zvoECKGo4PY4DvJfQusTI7BX/Ks+CPvtTfk3TqcR6S9VYBi/C+A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-module-imports": "^7.18.6",
"@rollup/pluginutils": "^5.0.1",
"workerpool": "^9.0.0"
"@rollup/pluginutils": "^5.0.1"
},
"engines": {
"node": ">=14.0.0"
@@ -2794,9 +2792,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.1.tgz",
"integrity": "sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.1.tgz",
"integrity": "sha512-xB0b51TB7IfDEzAojXahmr+gfA00uYVInJGgNNkeQG6RPnCPGr7udsylFLTubuIUSRE6FkcI1NElyRt83PP5oQ==",
"cpu": [
"arm"
],
@@ -2808,9 +2806,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.1.tgz",
"integrity": "sha512-Jx2g7iSjw4AOT0HDPHM9RV3GNjRXwybWtSFZiZAYUTjUwjVrYIwq3kBf+LnhqJlzXFAqTAh2F7IGI+O568exPw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.1.tgz",
"integrity": "sha512-XOjPId0qwSDKHaIsdzHJtKCxX0+nH8MhBwvrNsT7tVyKmdTx1jJ4XzN5RZXCdTzMpufLb+B8llTC0D8uCrLhcw==",
"cpu": [
"arm64"
],
@@ -2822,9 +2820,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.1.tgz",
"integrity": "sha512-0F1L/Z3Eqv8mT2n3dCpeO8GcTvHvVqkP5/t6DMsn0KzhYVcg+s7Ncl5DS8qjKYEeio6Az0Gt6nyBORay5qIlCA==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.1.tgz",
"integrity": "sha512-vQuRd28p0gQpPrS6kppd8IrWmFo42U8Pz1XLRjSZXq5zCqyMDYFABT7/sywL11mO1EL10Qhh7MVPEwkG8GiBeg==",
"cpu": [
"arm64"
],
@@ -2836,9 +2834,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.1.tgz",
"integrity": "sha512-qLttcH871ujY4YcVfUSShhOw+CsoTatYz8gRbHO7Bb92QH059/P0y5do1KMs41fY0BpD2x4AJH/gID0zFiqVKQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.1.tgz",
"integrity": "sha512-x6VG6U29+Ivlnajrg1IHdzXeAwSoEHBFVO+CtC9Brugx6de712CUJobRUxsIA0KYrQvCmzNrMPFTT1A4CCqNTg==",
"cpu": [
"x64"
],
@@ -2850,9 +2848,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.1.tgz",
"integrity": "sha512-fUI4RapGE0Oh3mb8mgfvC1O2nU1RpDZUKnDQm3xB1Ipg7C2wTs5Kstz7G2uWK99a8S2yTMq8/P4uycwNa0nJyw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.1.tgz",
"integrity": "sha512-Sgi0Uo6t1YCHJMNO3Y8+bm+SvOanUGkoZKn/VJPwYUe2kp31X5KnXmzKd/NjW8iA3gFcfNZ64zh14uOGrIllCQ==",
"cpu": [
"arm64"
],
@@ -2864,9 +2862,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.1.tgz",
"integrity": "sha512-H5YrdvJaDtI/U9/emrD4b++xkvp3y/JvOe4rizHbxvkyMfRS/CiRYdji+Pl8D0brEaNFWUh1drQxgAGIl6Xudw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.1.tgz",
"integrity": "sha512-AM4xnwEZwukdhk7laMWfzWu9JGSVnJd+Fowt6Fd7QW1nrf3h0Hp7Qx5881M4aqrUlKBCybOxz0jofvIIfl7C5g==",
"cpu": [
"x64"
],
@@ -2878,9 +2876,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.1.tgz",
"integrity": "sha512-Q8CBCCQtDFrYtXoeUXSrnFXKOnyUhx6bz+SkL6A0E7V8kAiCJ5pamq1WtbfpVGhR5TSpXY6ak3avmDc5fHTyJA==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.1.tgz",
"integrity": "sha512-KUizqxpwaR2AZdAUsMWfL/C94pUu7TKpoPd88c8yFVixJ+l9hejkrwoK5Zj3wiNh65UeyryKnJyxL1b7yNqFQA==",
"cpu": [
"arm"
],
@@ -2892,9 +2890,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.1.tgz",
"integrity": "sha512-nwnhk1581l0FBVellGcVCAT0Oi06onEA3WB53sf01VO3I0UPBkMH9sXONYME2K0ovXcNayJfNtHfm6mpJElatQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.1.tgz",
"integrity": "sha512-MZoQ/am77ckJtZGFAtPucgUuJWiop3m2R3lw7tC0QCcbfl4DRhQUBUkHWCkcrT3pqy5Mzv5QQgY6Dmlba6iTWg==",
"cpu": [
"arm"
],
@@ -2906,9 +2904,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.1.tgz",
"integrity": "sha512-x5Xr49hwt3hdW75UOZm3395YwwzPyauktslv29KpWL/T+vVAzoT3azLcTWv0eMciBNrx+DYjH4paehHoLpPvpg==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.1.tgz",
"integrity": "sha512-Sez95TP6xGjkWB1608EfhCX1gdGrO5wzyN99VqzRtC17x/1bhw5VU1V0GfKUwbW/Xr1J8mSasoFoJa6Y7aGGSA==",
"cpu": [
"arm64"
],
@@ -2920,9 +2918,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.1.tgz",
"integrity": "sha512-unMS3H73DpaoPyyEVPjGKleM/s0mkmsauTENpw4INQY8y4+IuLNjkueQ5QCtC0D3N38Y38yhAU8OoZ20S2Tm6w==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.1.tgz",
"integrity": "sha512-9Cs2Seq98LWNOJzR89EGTZoiP8EkZ9UbQhBlDgfAkM6asVna1xJ04W2CLYWDN/RpUgOjtQvcv8wQVi1t5oQazA==",
"cpu": [
"arm64"
],
@@ -2934,9 +2932,9 @@
]
},
"node_modules/@rollup/rollup-linux-loong64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.1.tgz",
"integrity": "sha512-zNZzGRnAhwjFEYmvphJRV5XaQGjs62cCmeYYHUT//NbvEnHauw+I85nGG+SiVg5ld4GX8D1IbKIX+ozITQnhMQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.1.tgz",
"integrity": "sha512-n9yqttftgFy7IrNEnHy1bOp6B4OSe8mJDiPkT7EqlM9FnKOwUMnCK62ixW0Kd9Clw0/wgvh8+SqaDXMFvw3KqQ==",
"cpu": [
"loong64"
],
@@ -2948,9 +2946,9 @@
]
},
"node_modules/@rollup/rollup-linux-loong64-musl": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.1.tgz",
"integrity": "sha512-LdpWGL8X209B2SIvWjqlc8VZgM6PKfontSerGepuldQmHYrAOtnMCXeJkxXGbC+PPZVOuu5czJo7fNV6aeW8rQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.1.tgz",
"integrity": "sha512-SfpNXDzVTqs/riak4xXcLpq5gIQWsqGWMhN1AGRQKB4qGSs4r0sEs3ervXPcE1O9RsQ5bm8Muz6zmQpQnPss1g==",
"cpu": [
"loong64"
],
@@ -2962,9 +2960,9 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.1.tgz",
"integrity": "sha512-EC5kTtNaNGOmbMGqar8dvJy6y/hg99GAwjfBz++pxZhQATXGcRjd6c5en5wcbru0vkRmiMGsQKdMJOOf6sza4g==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.1.tgz",
"integrity": "sha512-LjaChED0wQnjKZU+tsmGbN+9nN1XhaWUkAlSbTdhpEseCS4a15f/Q8xC2BN4GDKRzhhLZpYtJBZr2NZhR0jvNw==",
"cpu": [
"ppc64"
],
@@ -2976,9 +2974,9 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-musl": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.1.tgz",
"integrity": "sha512-8hiwp6D4acEcNK78I4rP0/XtS1sknWIAMJBPdR4l6zUtyTm5KiTDr5bXmWt4foY7nAN7AThDHgkLIEZOWKbzWw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.1.tgz",
"integrity": "sha512-ojW7iTJSIs4pwB2xV6QXGwNyDctvXOivYllttuPbXguuKDX5vwpqYJsHc6D2LZzjDGHML414Tuj3LvVPe1CT1A==",
"cpu": [
"ppc64"
],
@@ -2990,9 +2988,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.1.tgz",
"integrity": "sha512-10dh/h/BqA7DuMPWSxkR8uks18FRwnwOEqr5zOTEl+NOwP/OMzKX8OFR/Of9xxDA7D5qef1Nzar5WDD2kCCr1g==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.1.tgz",
"integrity": "sha512-FP+Q6WTcxxvsr0wQczhSE+tOZvFPV8A/mUE6mhZYFW9/eea/y/XqAgRoLLMuE9Cz0hfX5bi7p116IWoB+P237A==",
"cpu": [
"riscv64"
],
@@ -3004,9 +3002,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.1.tgz",
"integrity": "sha512-YKJ5lg35DP17gcAOggnihe+APw9HLyj1Xn7gsmGumBJAUDa6NGXNixJzmkWLhcK9TOuuyQjdamzvJefkO7qHZQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.1.tgz",
"integrity": "sha512-L1uD9b/Ig8Z+rn1KttCJjwhN1FgjRMBKsPaBsDKkfUl7GfFq71pU4vWCnpOsGljycFEbkHWARZLf4lMYg3WOLw==",
"cpu": [
"riscv64"
],
@@ -3018,9 +3016,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.1.tgz",
"integrity": "sha512-Mlil5G2Jj6a7B3LWGctg+XPL9vdXYuzCtNXfxOQ0nPjc2m6ueUktocPGH9bnAM0bNRKb/bAWTujUU7IJQdQA+g==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.1.tgz",
"integrity": "sha512-EZc9NGTk/oSUzzOD4nYY4gIjteo2M3CiozX6t1IXGCOdgxJTlVu/7EdPeiqeHPSIrxkLhavqpBAUCfvC6vBOug==",
"cpu": [
"s390x"
],
@@ -3032,9 +3030,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.1.tgz",
"integrity": "sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.1.tgz",
"integrity": "sha512-NQ9KyU1Anuy59L8+HHOKM++CoUxrQWrZWXRik4BJFm+7i5NP6q/SW43xIBr80zzt+PDBJ7LeNmloQGfa0JGk0w==",
"cpu": [
"x64"
],
@@ -3046,9 +3044,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.1.tgz",
"integrity": "sha512-qy5pBvZbqNFheBz61R1rzsezjm0J7O2oNGoWtGoY89SZYLUfxAJTBAqDChqAIdB4rCiIbi9nF7yZ83GnNiLwSw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.1.tgz",
"integrity": "sha512-GZkLk2t6naywsveSFBsEb0PLU+JC9ggVjbndsbG20VPhar6D1gkMfCx4NfP9owpovBXTN+eRdqGSkDGIxPHhmQ==",
"cpu": [
"x64"
],
@@ -3060,9 +3058,9 @@
]
},
"node_modules/@rollup/rollup-openbsd-x64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.1.tgz",
"integrity": "sha512-E83TXjI4zm0+5f2qO+UOudaCYIhYwpJ5jq6YCZNIZ+6CbfhKrkAGezeiASBL9ElxAxFsRS9ZhESv8mfnj6TKeg==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.1.tgz",
"integrity": "sha512-1hjG9Jpl2KDOetr64iQd8AZAEjkDUUK5RbDkYWsViYLC1op1oNzdjMJeFiofcGhqbNTaY2kfgqowE7DILifsrA==",
"cpu": [
"x64"
],
@@ -3074,9 +3072,9 @@
]
},
"node_modules/@rollup/rollup-openharmony-arm64": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.1.tgz",
"integrity": "sha512-fbWnKqVkjrJN38vNe3ahkbk6iejS/3b0Nt7EEtPpE6RBacZcGXNKbzfHN3GUUlXOPghUg0j6XUGrtjX9z1sIvA==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.1.tgz",
"integrity": "sha512-ARoKfflk0SiiYm3r1fmF73K/yB+PThmOwfWCk1sr7x/k9dc3uGLWuEE9if+Pw21el8MSpp3TMnG5vLNsJ/MMGQ==",
"cpu": [
"arm64"
],
@@ -3088,9 +3086,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.1.tgz",
"integrity": "sha512-ArMl38iVAbk0New1ogihQNY6iphLi4ZaRsa037gUzv5yeKPY8TD3Dmy4x2RNC1VztU/uqm+G+/RwFrSka3Oy2g==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.1.tgz",
"integrity": "sha512-oOST61G6VM45Mz2vdzWMr1s2slI7y9LqxEV5fCoWi2MDONmMvgsJVHSXxce/I2xOSZPTZ47nDPOl1tkwKWSHcw==",
"cpu": [
"arm64"
],
@@ -3102,9 +3100,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.1.tgz",
"integrity": "sha512-0mYtjHS9ucAbcATycCNK9IGBk/cCe/ma7EmSLGZdsxnOA8cjRIyU04wDpVAD9NiOfLUR9KTxdiO53uOkherqjQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.1.tgz",
"integrity": "sha512-x5WgLi5dWpRz7WclKBGEF15LcWTh0ewrHM6Cq4A+WUbkysUMZNeqt05bwPonOQ3ihPS/WMhAZV5zB1DfnI4Sxg==",
"cpu": [
"ia32"
],
@@ -3116,9 +3114,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-gnu": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.1.tgz",
"integrity": "sha512-gK1iCEPfpoSG9wfBihXxvBMi8ZfcWffYkEsC/Eih+iFENTaewvNcrEQ69lIOWYO5pePHKLHHO7nq5AILGO/HQQ==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.1.tgz",
"integrity": "sha512-wS+zHAJRVP5zOL0e+a3V3E/NTEwM2HEvvNKoDy5Xcfs0o8lljxn+EAFPkUsxihBdmDq1JWzXmmB9cbssCPdxxw==",
"cpu": [
"x64"
],
@@ -3130,9 +3128,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.1.tgz",
"integrity": "sha512-X+zaP2x+j4RXGfbp/seSoRHWnPxzApilDszisZxbYH5C/jTxFhCtDNdPGZb9lJyYPs24wGxruPF7Y+sIXt9Gzw==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.1.tgz",
"integrity": "sha512-rhHyrMeLpErT/C7BxcEsU4COHQUzHyrPYW5tOZUeUhziNtRuYxmDWvqQqzpuUt8xpOgmbKa1btGXfnA/ANVO+g==",
"cpu": [
"x64"
],
@@ -3292,9 +3290,9 @@
"license": "MIT"
},
"node_modules/@types/estree": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
"integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"dev": true,
"license": "MIT"
},
@@ -8382,20 +8380,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/mylas": {
"version": "2.1.14",
"resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.14.tgz",
"integrity": "sha512-BzQguy9W9NJgoVn2mRWzbFrFWWztGCcng2QI9+41frfk+Athwgx3qhqhvStz7ExeUUu7Kzw427sNzHpEZNINog==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=16.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/raouldeheer"
}
},
"node_modules/nanocolors": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.13.tgz",
@@ -8854,19 +8838,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/plimit-lit": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz",
"integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==",
"dev": true,
"license": "MIT",
"dependencies": {
"queue-lit": "^1.5.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/portfinder": {
"version": "1.0.38",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.38.tgz",
@@ -9029,16 +9000,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/queue-lit": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz",
"integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -9393,13 +9354,13 @@
}
},
"node_modules/rollup": {
"version": "4.61.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.1.tgz",
"integrity": "sha512-I4KW6iuRpuu2uHBLraZ1wNZe0DP7lnRha+VJ9tNaYVaVgKhW0aI3h4RYnoRPeql0flHm/Co55b7snEDcOfOJrA==",
"version": "4.59.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.1.tgz",
"integrity": "sha512-iZKH8BeoCwTCBTZBZWQQMreekd4mdomwdjIQ40GC1oZm6o+8PnNMIxFOiCsGMWeS8iDJ7KZcl7KwmKk/0HOQpA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "1.0.9"
"@types/estree": "1.0.8"
},
"bin": {
"rollup": "dist/bin/rollup"
@@ -9409,31 +9370,31 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.61.1",
"@rollup/rollup-android-arm64": "4.61.1",
"@rollup/rollup-darwin-arm64": "4.61.1",
"@rollup/rollup-darwin-x64": "4.61.1",
"@rollup/rollup-freebsd-arm64": "4.61.1",
"@rollup/rollup-freebsd-x64": "4.61.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.61.1",
"@rollup/rollup-linux-arm-musleabihf": "4.61.1",
"@rollup/rollup-linux-arm64-gnu": "4.61.1",
"@rollup/rollup-linux-arm64-musl": "4.61.1",
"@rollup/rollup-linux-loong64-gnu": "4.61.1",
"@rollup/rollup-linux-loong64-musl": "4.61.1",
"@rollup/rollup-linux-ppc64-gnu": "4.61.1",
"@rollup/rollup-linux-ppc64-musl": "4.61.1",
"@rollup/rollup-linux-riscv64-gnu": "4.61.1",
"@rollup/rollup-linux-riscv64-musl": "4.61.1",
"@rollup/rollup-linux-s390x-gnu": "4.61.1",
"@rollup/rollup-linux-x64-gnu": "4.61.1",
"@rollup/rollup-linux-x64-musl": "4.61.1",
"@rollup/rollup-openbsd-x64": "4.61.1",
"@rollup/rollup-openharmony-arm64": "4.61.1",
"@rollup/rollup-win32-arm64-msvc": "4.61.1",
"@rollup/rollup-win32-ia32-msvc": "4.61.1",
"@rollup/rollup-win32-x64-gnu": "4.61.1",
"@rollup/rollup-win32-x64-msvc": "4.61.1",
"@rollup/rollup-android-arm-eabi": "4.59.1",
"@rollup/rollup-android-arm64": "4.59.1",
"@rollup/rollup-darwin-arm64": "4.59.1",
"@rollup/rollup-darwin-x64": "4.59.1",
"@rollup/rollup-freebsd-arm64": "4.59.1",
"@rollup/rollup-freebsd-x64": "4.59.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.59.1",
"@rollup/rollup-linux-arm-musleabihf": "4.59.1",
"@rollup/rollup-linux-arm64-gnu": "4.59.1",
"@rollup/rollup-linux-arm64-musl": "4.59.1",
"@rollup/rollup-linux-loong64-gnu": "4.59.1",
"@rollup/rollup-linux-loong64-musl": "4.59.1",
"@rollup/rollup-linux-ppc64-gnu": "4.59.1",
"@rollup/rollup-linux-ppc64-musl": "4.59.1",
"@rollup/rollup-linux-riscv64-gnu": "4.59.1",
"@rollup/rollup-linux-riscv64-musl": "4.59.1",
"@rollup/rollup-linux-s390x-gnu": "4.59.1",
"@rollup/rollup-linux-x64-gnu": "4.59.1",
"@rollup/rollup-linux-x64-musl": "4.59.1",
"@rollup/rollup-openbsd-x64": "4.59.1",
"@rollup/rollup-openharmony-arm64": "4.59.1",
"@rollup/rollup-win32-arm64-msvc": "4.59.1",
"@rollup/rollup-win32-ia32-msvc": "4.59.1",
"@rollup/rollup-win32-x64-gnu": "4.59.1",
"@rollup/rollup-win32-x64-msvc": "4.59.1",
"fsevents": "~2.3.2"
}
},
@@ -10358,63 +10319,6 @@
"node": ">=18"
}
},
"node_modules/tsc-alias": {
"version": "1.8.17",
"resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.17.tgz",
"integrity": "sha512-EIduCZHqbNwPm8BZYfq1aD7BQ697A4h6uSGMOFQfYGoQwfrYFTKwYfy9Bv42YxHkduVBcn9Zx0DkX111DKskyg==",
"dev": true,
"license": "MIT",
"dependencies": {
"chokidar": "^3.5.3",
"commander": "^9.0.0",
"get-tsconfig": "^4.10.0",
"globby": "^11.0.4",
"mylas": "^2.1.9",
"normalize-path": "^3.0.0",
"plimit-lit": "^1.2.6"
},
"bin": {
"tsc-alias": "dist/bin/index.js"
},
"engines": {
"node": ">=16.20.2"
}
},
"node_modules/tsc-alias/node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/tsc-alias/node_modules/commander": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.20.0 || >=14"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
@@ -11452,13 +11356,6 @@
"workbox-core": "7.4.0"
}
},
"node_modules/workerpool": {
"version": "9.3.4",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz",
"integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/wrap-ansi": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+2 -3
View File
@@ -17,7 +17,7 @@
"devDependencies": {
"@custom-elements-manifest/analyzer": "~0.11",
"@open-wc/testing": "~4.0",
"@rollup/plugin-babel": "~7.1",
"@rollup/plugin-babel": "~7.0",
"@rollup/plugin-node-resolve": "~16.0",
"@types/mocha": "~10.0",
"@web/dev-server": "~0.4",
@@ -26,10 +26,9 @@
"@web/test-runner": "~0.20",
"babel-plugin-template-html-minifier": "~4.1",
"deepmerge": "~4.3",
"rollup": "~4.61",
"rollup": "~4.59",
"rollup-plugin-esbuild": "~6.2",
"rollup-plugin-workbox": "~8.1",
"tsc-alias": "~1.8",
"tslib": "~2.8",
"typescript": "~6.0"
},
+4 -6
View File
@@ -4,10 +4,8 @@ import { rollupPluginHTML as html } from "@web/rollup-plugin-html";
import { importMetaAssets } from "@web/rollup-plugin-import-meta-assets";
import esbuild from "rollup-plugin-esbuild";
import { generateSW } from "rollup-plugin-workbox";
import { paths } from "./bs/dev/paths.js";
import { join } from "node:path";
const pathDist = join.bind(null, paths.dist);
export default {
input: "index.html",
output: {
@@ -15,7 +13,7 @@ export default {
chunkFileNames: "[hash].js",
assetFileNames: "[hash][extname]",
format: "es",
dir: pathDist(),
dir: "dist",
},
preserveEntrySignatures: false,
@@ -24,7 +22,7 @@ export default {
html({
minify: true,
injectServiceWorker: true,
serviceWorkerPath: pathDist("sw.js"),
serviceWorkerPath: "dist/sw.js",
}),
/** Resolve bare module imports */
nodeResolve(),
@@ -61,9 +59,9 @@ export default {
globIgnores: ["polyfills/*.js", "nomodule-*.js"],
navigateFallback: "/index.html",
// where to output the generated sw
swDest: pathDist("sw.js"),
swDest: join("dist", "sw.js"),
// directory to match patterns against to be precached
globDirectory: pathDist(),
globDirectory: join("dist"),
// cache any html js and css by default
globPatterns: ["**/*.{html,js,css,webmanifest}"],
skipWaiting: true,
-63
View File
@@ -1,63 +0,0 @@
# CommaFeed Podcasts Web Component/App
This repository contains the **source code** for a small progressive web application built with Lit and OpenWC recommendations.
## Highlevel structure
### Pages (`app-*`, `index.ts`, `*.css.ts`, `*.test.ts`)
Folder naming (`app-name`) corresponds to custom element name (`<app-name>`) and endpoint (`/name`).
Dynamic parameters are supported using `:` in the name (`app-:id`/`<app-episode id=${id}>`/`/episodes/:id`).
Each folder follows a consistent pattern:
1. **Page component file** `index.ts` contains the Lit component definition.
1. **Styles** `*.css.ts` holds the scoped CSS for that component.
1. **Tests** optional `*.test.ts` hoding overall app router tests (probably integration test).
1. **Routing helper** optional `routes.ts`
1. **README** describes the modules purpose and key files.
Below is an overview of the current pages:
- [`<app-home>`](./app-home)
- [`<app-episodes>`](./app-episodes)
*(More feature modules can be added in the future following the same pattern.)*
### Components (`src/components/`, `*.css.ts`, `*.test.ts`)
The `components/` folder contains reusable UI building blocks shared across feature modules.
- file naming: `c-name` (files `c-name.ts` and `c-name.css.ts`)
- folder follows the same pattern as pages (except no routes)
### Core (`src/core/`, `*.test.ts`)
The `core/` folder contains routing and translation infrastructure, and shared utilities.
The `*.test.ts` files are used for unit tests for given core file.
### Assets (`src/assets/`)
The `assets/` folder contains static files (logos, icons, etc.) that are imported by components.
Use `new URL('/assets/logo.png', import.meta.url)` to get the URL of a static file.
## How routing works
The application uses a lightweight clientside router (see `core/routes.ts`).
Route definitions look like:
```ts
import { route } from "@/core/route.js";
import { html } from "lit";
export const path = "/episodes/" as const;
export const routes = route(
{
path: "/episodes/:id/",
async enter() {
await import("./index.js");
return true;
},
render({ id }){
return html`<app-episode id=${id}></app-episode>`;
},
},
);
```
@@ -1,10 +1,10 @@
import { route } from "@/core/route.js";
import { route } from "../../core/route.js";
import { html } from "lit";
export const path = "/episodes/" as const;
export const path = "/episodes" as const;
export const routes = route(
{
path: "/episodes/:id/",
path: "/episodes/:id",
async enter() {
await import("./index.js");
return true;
-8
View File
@@ -1,8 +0,0 @@
# `<app-episodes>`
Displays a list of podcast episodes.
## Subroutes
### `<app-:id>`
The component is routed to via `/episodes/:id?` where `:id` is an optional episode identifier used to show a specific episode.
+3 -1
View File
@@ -2,12 +2,14 @@ import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { styles } from "./index.css.js";
const logo = new URL("../../../assets/logo.svg", import.meta.url);
@customElement("app-episodes")
export class AppEpisodes extends LitElement {
static override styles = styles;
override render() {
return html`
<div class="logo"></div>
<div class="logo"><img alt="open-wc logo" src=${logo} /></div>
<a href="/episodes/1">Episode 1</a>
`;
}
+3 -3
View File
@@ -1,8 +1,8 @@
import { route } from "@/core/route.js";
import { routes as routeEpisode } from "./app-:id/routes.js";
import { route } from "../core/route.js";
import { routes as routeEpisode } from "./:id/routes.js";
import { html } from "lit";
export const path = "/episodes/" as const;
export const path = "/episodes" as const;
export const routes = route(
{
path,
-7
View File
@@ -1,7 +0,0 @@
# apphome
This feature module implements the home page of the podcast application and handles navigation logic.
## Files
- `index.ts` Lit component that renders the landing view.
- `router.js` (if any) Routing helpers for navigating between pages.
-9
View File
@@ -1,9 +0,0 @@
import { css } from "lit";
export const styles = css`
:host {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
}
`;
-22
View File
@@ -1,22 +0,0 @@
import { html } from "lit";
import { fixture, expect } from "@open-wc/testing";
import type { AppHome } from "./index.js";
import "./index.js";
describe("AppHome", () => {
let element: AppHome;
beforeEach(async () => {
element = await fixture(html`<app-home></app-home>`);
});
it("renders a h1", () => {
const h1 = element.shadowRoot!.querySelector('h1')!;
expect(h1).to.exist;
expect(h1.textContent).to.equal('My app');
});
it("passes the a11y audit", async () => {
await expect(element).shadowDom.to.be.accessible();
});
});
-15
View File
@@ -1,15 +0,0 @@
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { styles } from "./index.css.js";
@customElement("app-home")
export class AppHome extends LitElement {
static override styles = styles;
override render() {
return html`
<h1>My app</h1>
<p>Hello world</p>
<a href="/episodes">Episode</a>
`;
}
}
-16
View File
@@ -1,16 +0,0 @@
import { route } from "@/core/route.js";
import { html } from "lit";
export const path = "/" as const;
export const routes = route(
{
path,
async enter() {
await import("./index.js");
return true;
},
render(){
return html`<app-home></app-home>`;
},
},
);
-24
View File
@@ -1,24 +0,0 @@
import { LitElement, css, html } from "lit";
import { customElement } from "lit/decorators.js";
const styles = css`
:host {
position: absolute;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
padding: 0;
border: 0;
height: 1px;
width: 1px;
overflow: hidden;
}
`;
@customElement("c-sronly")
export class CSronly extends LitElement {
static override styles = styles;
override render() {
return html`
<slot></slot>
`;
}
}
+1 -3
View File
@@ -5,11 +5,9 @@ export function route(...routes: (PathRouteConfig|PathRouteConfig[])[]): PathRou
if (Array.isArray(route)) // already processed
return route;
const { path, ...rest }= route;
if (!path.endsWith("/"))
throw new Error("path must end with „/”!");
return [
{ path, ...rest },
{ path: path.slice(0, -1), ...rest },
{ path: path + "/", rest },
];
});
}
+1 -18
View File
@@ -7,31 +7,14 @@ export const styles = css`
grid-template-areas:
"main"
"footer";
grid-template-rows: auto 4ch;
overflow: hidden;
grid-template-rows: auto 2.5ch;
}
main {
grid-area: main;
overflow: scroll;
}
nav {
grid-area: footer;
display: flex;
flex-flow: row nowrap;
justify-content: space-evenly;
align-items: center;
padding: .5ch;
a {
display: block;
height: 100%;
aspect-ratio: 1;
}
img {
height: 100%;
}
}
`;
-27
View File
@@ -1,27 +0,0 @@
import { html } from "lit";
import { fixture, expect } from "@open-wc/testing";
import type { AppCfpodcasts } from "./index.js";
import "./index.js";
describe("App", () => {
let element: AppCfpodcasts;
let nav: HTMLElement;
beforeEach(async () => {
element = await fixture(html`<app-cfpodcasts></app-cfpodcasts>`);
nav = element.shadowRoot!.querySelector("nav")!;
});
it("renders <main>", () => {
const content = element.shadowRoot!.querySelector('main')!;
expect(content).to.exist;
});
it("has all pages", async () => {
const links = nav.querySelectorAll("a");
await expect(links.length).to.equal(2);
});
it("passes the a11y audit", async () => {
await expect(nav).shadowDom.to.be.accessible();
});
});
+4 -20
View File
@@ -2,38 +2,22 @@ import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { styles } from "./index.css.js";
import { Router } from "@lit-labs/router";
import * as routeHome from "./app-home/routes.js";
import * as routeEpisodes from "./app-episodes/routes.js";
import "./components/c-sronly.js";
const logo = new URL("./assets/logo.svg", import.meta.url);
@customElement("app-cfpodcasts")
export class AppCfpodcasts extends LitElement {
static override styles = styles;
private _routes = new Router(this, [
...routeHome.routes,
{ path: "/", render: () => html`Hello world` },
...routeEpisodes.routes,
]);
override render() {
console.log(this._routes); // TODO
console.log(this._routes);
return html`
<main>${this._routes.outlet()}</main>
<nav>
<a
href="${this._routes.link("/")}"
title="Navigate to the home page"
>
<img alt="" src=${logo} />
<c-sronly>Home</c-sronly>
</a>
<a
href="${this._routes.link(routeEpisodes.path)}"
title="Navigate to the list of episodes"
>
Episodes
</a>
<a href="${this._routes.link("/")}">Home</a>
<a href="${this._routes.link(routeEpisodes.path)}">Episodes</a>
</nav>
`;
}
+22
View File
@@ -0,0 +1,22 @@
import { html } from 'lit';
import { fixture, expect } from '@open-wc/testing';
import type { AppCfpodcasts } from '../src/index.js';
import '../src/index.js';
describe('AppCfpodcasts', () => {
let element: AppCfpodcasts;
beforeEach(async () => {
element = await fixture(html`<app-cfpodcasts></app-cfpodcasts>`);
});
it('renders a h1', () => {
const h1 = element.shadowRoot!.querySelector('h1')!;
expect(h1).to.exist;
expect(h1.textContent).to.equal('My app');
});
it('passes the a11y audit', async () => {
await expect(element).shadowDom.to.be.accessible();
});
});
+2 -5
View File
@@ -26,16 +26,13 @@
"noErrorTruncation": false,
"outDir": ".tmp/tsc",
"outDir": "out-tsc",
"sourceMap": true,
"inlineSources": true,
"rootDir": "./",
"incremental": true,
"types": ["mocha"],
"lib": ["es2021", "dom", "DOM.Iterable"],
"paths": {
"@/*": ["./src/*"]
}
"lib": ["es2021", "dom", "DOM.Iterable"]
},
"include": ["**/*.ts"]
}
+4 -8
View File
@@ -3,18 +3,14 @@
/** Use Hot Module replacement by adding --watch to the start command */
//const hmr = process.argv.includes("--watch");
const [ mode ] = process.argv.slice(2);
import { paths } from "./bs/dev/paths.js";
import { join } from "node:path";
const pathDist = join.bind(null, paths.dist);
const target = mode !== "dist" // OR "src"
const target = mode === "src" // OR "dist"
? {
rootDir: ".",
appIndex: "index.html",
appIndex: "./index.html",
}
: {
rootDir: pathDist(),
appIndex: pathDist("index.html"),
rootDir: "./dist",
appIndex: "./dist/index.html",
};
export default /** @type {import("@web/dev-server").DevServerConfig} */ ({
+4 -10
View File
@@ -1,32 +1,26 @@
// import { playwrightLauncher } from '@web/test-runner-playwright';
const filteredLogs = ["Running in dev mode", "Lit is in dev mode"];
import { paths } from "./bs/dev/paths.js";
import { join } from "node:path";
const filteredLogs = ['Running in dev mode', 'Lit is in dev mode'];
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
/** Test files to run */
files: join(paths.tscoutput, "src/**/*.test.js"),
files: 'out-tsc/test/**/*.test.js',
/** Resolve bare module imports */
nodeResolve: {
exportConditions: ["browser", "development"],
exportConditions: ['browser', 'development'],
},
/** Filter out lit dev mode logs */
filterBrowserLogs(log) {
for (const arg of log.args) {
if (typeof arg === "string" && filteredLogs.some(l => arg.includes(l))) {
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
return false;
}
}
return true;
},
coverageConfig: {
reportDir: join(paths.tmp, "coverage"),
},
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
// esbuildTarget: 'auto',