Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review #3

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const viteConfig = require('./vite.config.js');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const util = require('util');
const { default: vuePlugin } = require('@vitejs/plugin-vue');

const fs = require('fs');

const componentRegistry = {
Expand Down Expand Up @@ -32,10 +32,14 @@ module.exports = function (eleventyConfig) {

eleventyConfig.addPlugin(EleventyVitePlugin, {
tempFolderName: '.11ty-vite', // Default name of the temp folder

// Defaults are shown:
viteOptions: viteConfig,
});

return {
dir: {
input: 'src',
},
};
};

function transformContent(content) {
Expand All @@ -53,13 +57,18 @@ function tryComponents(doc) {
let registeredComponentPath = value;
console.log(`${registeredComponent} at ${registeredComponentPath}`);
let comp = doc.querySelector(registeredComponent);

if (!comp) {
continue;
}

let childTemplate = comp.innerHTML;

let componentString = '';

let tempComponentReg = [];

//check comp recursively against component registry

//let props = Object.values(comp.attributes);

let VueWrapper = `
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pragmatic Vue Components 🔌
# Pragmatic Vue Components

This comment was marked as off-topic.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice title

This comment was marked as off-topic.


## Use Vue Components to author HTML/nunjucks/liquid layouts in 11ty SSG

Expand Down