[ci] yarn format

This commit is contained in:
matthewp 2021-07-13 12:28:50 +00:00 committed by GitHub Actions
parent 48851c9d25
commit 59f6792b00
7 changed files with 27 additions and 36 deletions

View file

@ -6,8 +6,8 @@ class Counter extends LitElement {
static get properties() { static get properties() {
return { return {
count: { count: {
type: Number type: Number,
} },
}; };
} }

View file

@ -6,15 +6,13 @@ class CalcAdd extends LitElement {
static get properties() { static get properties() {
return { return {
num: { num: {
type: Number type: Number,
} },
}; };
} }
render() { render() {
return html` return html` <div>Number: ${this.num}</div> `;
<div>Number: ${this.num}</div>
`;
} }
} }

View file

@ -3,7 +3,11 @@ async function polyfill() {
hydrateShadowRoots(document.body); hydrateShadowRoots(document.body);
} }
if(!(new DOMParser().parseFromString(`<p><template shadowroot="open"></template></p>`, 'text/html', { if (
includeShadowRoots: true !new DOMParser()
}).querySelector('p')?.shadowRoot)) .parseFromString(`<p><template shadowroot="open"></template></p>`, 'text/html', {
includeShadowRoots: true,
})
.querySelector('p')?.shadowRoot
)
polyfill(); polyfill();

View file

@ -1,19 +1,8 @@
export default { export default {
name: '@astrojs/renderer-lit', name: '@astrojs/renderer-lit',
server: './server.js', server: './server.js',
external: [ external: ['@lit-labs/ssr/lib/install-global-dom-shim.js', '@lit-labs/ssr/lib/render-lit-html.js', '@lit-labs/ssr/lib/lit-element-renderer.js'],
'@lit-labs/ssr/lib/install-global-dom-shim.js', polyfills: ['./client-shim.js'],
'@lit-labs/ssr/lib/render-lit-html.js', hydrationPolyfills: ['lit/experimental-hydrate-support.js'],
'@lit-labs/ssr/lib/lit-element-renderer.js' knownEntrypoints: ['@astrojs/renderer-lit/client-shim.js', '@webcomponents/template-shadowroot/template-shadowroot.js'],
],
polyfills: [
'./client-shim.js'
],
hydrationPolyfills: [
'lit/experimental-hydrate-support.js'
],
knownEntrypoints: [
'@astrojs/renderer-lit/client-shim.js',
'@webcomponents/template-shadowroot/template-shadowroot.js'
]
}; };

View file

@ -54,11 +54,11 @@ async function renderToStaticMarkup(Component, props, children) {
} }
return { return {
html: out html: out,
}; };
} }
export default { export default {
check, check,
renderToStaticMarkup renderToStaticMarkup,
}; };