[ci] yarn format
This commit is contained in:
parent
48851c9d25
commit
59f6792b00
7 changed files with 27 additions and 36 deletions
|
@ -6,8 +6,8 @@ class Counter extends LitElement {
|
|||
static get properties() {
|
||||
return {
|
||||
count: {
|
||||
type: Number
|
||||
}
|
||||
type: Number,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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> `;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
|
@ -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'],
|
||||
};
|
||||
|
|
|
@ -54,11 +54,11 @@ async function renderToStaticMarkup(Component, props, children) {
|
|||
}
|
||||
|
||||
return {
|
||||
html: out
|
||||
html: out,
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
check,
|
||||
renderToStaticMarkup
|
||||
renderToStaticMarkup,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue