[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() {
return {
count: {
type: Number
}
type: Number,
},
};
}

View file

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

View file

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

View file

@ -1,19 +1,8 @@
export default {
name: '@astrojs/renderer-lit',
server: './server.js',
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'
],
polyfills: [
'./client-shim.js'
],
hydrationPolyfills: [
'lit/experimental-hydrate-support.js'
],
knownEntrypoints: [
'@astrojs/renderer-lit/client-shim.js',
'@webcomponents/template-shadowroot/template-shadowroot.js'
]
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'],
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 {
html: out
html: out,
};
}
export default {
check,
renderToStaticMarkup
renderToStaticMarkup,
};