Update lit-starter-ts to lit-next

* Upgrades the source to work with lit-next
* Aligns the linting and formatting rules/settings & ignores with the monorepo
* Upgrades to the same version of typescript and tsconfig settings as the monorepo
* Upgrades the test runner from karma to web-test-runner
* Upgrades the dev server from es-dev-server to @web/dev-server
This commit is contained in:
Kevin Schaaf
2021-01-29 17:34:51 -08:00
parent 6b7f29aedb
commit fddb01149c
36 changed files with 5508 additions and 300 deletions

View File

@@ -1,4 +1,4 @@
# LitElement TypeScript starter
# LitElement TypeScript starter
This project includes a sample component using LitElement with TypeScript.
@@ -30,7 +30,11 @@ Both the TypeScript compiler and lit-analyzer are configured to be very strict.
## Testing
This sample uses Karma, Chai, Mocha, and the open-wc test helpers for testing. See the [open-wc testing documentation](https://open-wc.org/testing/testing.html) for more information.
This sample modern-web.dev's
[@web/test-runner](https://www.npmjs.com/package/@web/test-runner) along with
Mocha, Chai, and some related helpers for testing. See the
[modern-web.dev testing documentation](https://modern-web.dev/docs/test-runner/overview) for
more information.
Tests can be run with the `test` script:
@@ -40,7 +44,7 @@ npm test
## Dev Server
This sample uses open-wc's [es-dev-server](https://github.com/open-wc/open-wc/tree/master/packages/es-dev-server) for previewing the project without additional build steps. ES dev server handles resolving Node-style "bare" import specifiers, which aren't supported in browsers. It also automatically transpiles JavaScript and adds polyfills to support older browsers.
This sample uses modern-web.dev's [@web/dev-server](https://www.npmjs.com/package/@web/dev-server) for previewing the project without additional build steps. Web Dev Server handles resolving Node-style "bare" import specifiers, which aren't supported in browsers. It also automatically transpiles JavaScript and adds polyfills to support older browsers. See [modern-web.dev's Web Dev Server documentation](https://modern-web.dev/docs/dev-server/overview/) for more information.
To run the dev server and open the project in a new browser tab:
@@ -53,15 +57,16 @@ There is a development HTML file located at `/dev/index.html` that you can view
## Editing
If you use VS Code, we highly reccomend the [lit-plugin extension](https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin), which enables some extremely useful features for lit-html templates:
- Syntax highlighting
- Type-checking
- Code completion
- Hover-over docs
- Jump to definition
- Linting
- Quick Fixes
The project is setup to reccomend lit-plugin to VS Code users if they don't already have it installed.
- Syntax highlighting
- Type-checking
- Code completion
- Hover-over docs
- Jump to definition
- Linting
- Quick Fixes
The project is setup to reccomend lit-plugin to VS Code users if they don't already have it installed.
## Linting