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

39
web-test-runner.config.js Normal file
View File

@@ -0,0 +1,39 @@
import {playwrightLauncher} from '@web/test-runner-playwright';
import {legacyPlugin} from '@web/dev-server-legacy';
let commandLineBrowsers;
try {
commandLineBrowsers = process.env.BROWSERS?.split(',').map((b) =>
playwrightLauncher({product: b})
);
} catch {
console.warn(`BROWSER ${process.env.BROWSERS} unknown; using defaults`);
}
// https://modern-web.dev/docs/test-runner/cli-and-configuration/
export default {
rootDir: '.',
files: ['./test/**/*_test.js'],
nodeResolve: true,
preserveSymlinks: true,
browsers: commandLineBrowsers ?? [
playwrightLauncher({product: 'chromium'}),
playwrightLauncher({product: 'firefox'}),
playwrightLauncher({product: 'webkit'}),
],
testFramework: {
// https://mochajs.org/api/mocha
config: {
ui: 'tdd',
},
},
plugins: [
// Detect browsers without modules (e.g. IE11) and transform to SystemJS
// (https://modern-web.dev/docs/dev-server/plugins/legacy/).
legacyPlugin({
polyfills: {
webcomponents: true,
},
}),
],
};