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

@@ -4,8 +4,7 @@ const relative = require('./relative-path.cjs');
/**
* This template extends the page template and adds an examples list.
*/
module.exports = function(data) {
module.exports = function (data) {
return page({
...data,
content: renderExample(data),
@@ -18,13 +17,22 @@ const renderExample = ({name, content, collections, page}) => {
<section class="examples">
<nav class="collection">
<ul>
${collections.example === undefined
${
collections.example === undefined
? ''
: collections.example.map((post) => `
: collections.example
.map(
(post) => `
<li class=${post.url === page.url ? 'selected' : ''}>
<a href="${relative(page.url, post.url)}">${post.data.description.replace('<', '&lt;')}</a>
<a href="${relative(
page.url,
post.url
)}">${post.data.description.replace('<', '&lt;')}</a>
</li>
`).join('')}
`
)
.join('')
}
</ul>
</nav>
<div>