diff --git a/README.md b/README.md index ee11c9e..991e2b1 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ In addition, WCC hopes to provide a surface area to explore patterns around [str ## Key Features 1. Supports the following `HTMLElement` lifecycles and methods on the server side + - `constructor` - `connectedCallback` - `attachShadow` - `innerHTML` diff --git a/build.js b/build.js index e4f99f9..ea57d40 100644 --- a/build.js +++ b/build.js @@ -11,7 +11,9 @@ async function init() { const distRoot = './dist'; const pagesRoot = './docs/pages'; const pages = await fs.readdir(new URL(pagesRoot, import.meta.url)); - const { html } = await renderToString(new URL('./docs/index.js', import.meta.url), false); + const { html } = await renderToString(new URL('./docs/index.js', import.meta.url), { + lightMode: true + }); // await fs.rm(distRoot, { recursive: true, force: true }); // await fs.mkdir('./dist', { recursive: true }); @@ -65,7 +67,7 @@ async function init() { - Web Components Compiler (WCC) + WCC - Web Components Compiler diff --git a/docs/components/footer.js b/docs/components/footer.js index c77dddc..8ad789d 100644 --- a/docs/components/footer.js +++ b/docs/components/footer.js @@ -3,24 +3,20 @@ const template = document.createElement('template'); template.innerHTML = ` diff --git a/docs/components/navigation.js b/docs/components/navigation.js index 2e68709..7b8cb3b 100644 --- a/docs/components/navigation.js +++ b/docs/components/navigation.js @@ -3,22 +3,21 @@ const template = document.createElement('template'); template.innerHTML = ` diff --git a/docs/pages/docs.md b/docs/pages/docs.md index c520904..6b7919f 100644 --- a/docs/pages/docs.md +++ b/docs/pages/docs.md @@ -11,6 +11,11 @@ This function takes a `URL` to a JavaScript file that defines a custom element, const { html } = await renderToString(new URL('./src/index.js', import.meta.url)); ``` +#### Options + +`renderToString` also supports a second parameter that is an object, called `options`, which supports the following configurations: + +- `lightMode`: For more static outcomes (e.g. no declarative shadow DOM), this option will omit all wrapping `