From 44273599f882edfc4258031987dc542ab62e8c0c Mon Sep 17 00:00:00 2001 From: Jacob Milhorn <68669571+earlAchromatic@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:48:04 -0500 Subject: [PATCH 1/8] Update README.md --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 1512fc9..04ec57f 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,12 @@ I have wanted to use Vue components directly in my markup for a while. This is easily done by exporting Vue Components as Native Web Components (.ce.vue) but then you deal with other issues... some of these are dealt with in lit's 11ty plugin setup.. -I like the idea of just writing the components in and having an 11ty plugin add the vue scripts as necessary. Some of these can get prerendered and not hydrated, some can get hydrated and you can just use async components and determine rules for when the component is fetched. - Now, we have a fully capable partial hydration setup and Fully functional vue components in SFC format that I can simply write as if they were HTML while I am composing layouts and pages. The best part is, I can use slotting to write embedded markup inside components. I can even use other components inside my components just by adding the Vue elements. --- -Cons: - -its a vue only solution -ships with vue runtime compiler -have to register components manually (how can I automate this) - Pros: its a vue only solution @@ -38,7 +30,6 @@ no custom elements required ## Feature list to build - props seeker via attr -- 11ty data props builder/helper functions (see nunjucks loops to build data object in jacobmilhorn.com proj) - multiple component loop (for the .componetn() func) - recursive component recognition in child template (see above item, they are the same thing) - automatic component registration based on whats in the `components` folder From 9f5c594f46af6b4bc7fd6101cf046849e6884027 Mon Sep 17 00:00:00 2001 From: Jacob Milhorn <68669571+earlAchromatic@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:48:36 -0500 Subject: [PATCH 2/8] Update .eleventy.js --- .eleventy.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 88930cb..f3ff336 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -18,8 +18,6 @@ module.exports = function (eleventyConfig) { eleventyConfig.on( 'eleventy.after', async ({ dir, results, runMode, outputMode }) => { - // Read more below - console.log(results[0].content); results.forEach((result) => { if (result.content) { console.log(`writing to ${result.outputPath}`); @@ -33,17 +31,11 @@ function tryComponents(doc) { for (const [key, value] of Object.entries(componentRegistry)) { let registeredComponent = key; let registeredComponentPath = value; - console.log(`${registeredComponent} at ${registeredComponentPath}`); let comp = doc.querySelector(registeredComponent); - if (!comp) { - continue; - } + if (!comp) continue; let childTemplate = comp.innerHTML; - - //let props = Object.values(comp.attributes); - let VueWrapper = `