Update to Lit 2.0.0 (manually)

Will attempt to get this back to syncing with monorepo history per https://github.com/lit/lit#exporting-starter-templates in a follow-up.
This commit is contained in:
Kevin Schaaf
2021-09-20 21:01:02 -07:00
parent 1f62cf47ed
commit a2c387402d
19 changed files with 31059 additions and 28678 deletions

View File

@@ -36,12 +36,20 @@ 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:
Tests can be run with the `test` script, which will run your tests against Lit's development mode (with more verbose errors) as well as against Lit's production mode:
```bash
npm test
```
For local testing during development, the `test:dev:watch` command will run your tests in Lit's development mode (with verbose errors) on every change to your source files:
```bash
npm test:watch
```
Alternatively the `test:prod` and `test:prod:watch` commands will run your tests in Lit's production mode.
## Dev Server
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.
@@ -52,7 +60,7 @@ To run the dev server and open the project in a new browser tab:
npm run serve
```
There is a development HTML file located at `/dev/index.html` that you can view at http://localhost:8000/dev/index.html.
There is a development HTML file located at `/dev/index.html` that you can view at http://localhost:8000/dev/index.html. Note that this command will serve your code using Lit's development mode (with more verbose errors). To serve your code against Lit's production mode, use `npm run serve:prod`.
## Editing
@@ -82,7 +90,7 @@ npm run lint
## Formatting
[Prettier](https://prettier.io/) is used for code formatting. It has been pre-configured according to the Polymer Project's style. You can change this in `.prettierrc.json`.
[Prettier](https://prettier.io/) is used for code formatting. It has been pre-configured according to the Lit's style. You can change this in `.prettierrc.json`.
Prettier has not been configured to run when committing files, but this can be added with Husky and and `pretty-quick`. See the [prettier.io](https://prettier.io/) site for instructions.