chore: clean up unused imports
This commit is contained in:
parent
b48bd9a282
commit
a452e1c386
1 changed files with 1 additions and 14 deletions
|
@ -2,16 +2,7 @@
|
||||||
* McFly SSR logic
|
* McFly SSR logic
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import { ELEMENT_NODE, parse, render, renderSync, walkSync } from "ultrahtml";
|
||||||
ELEMENT_NODE,
|
|
||||||
parse,
|
|
||||||
render,
|
|
||||||
renderSync,
|
|
||||||
walkSync,
|
|
||||||
transform,
|
|
||||||
html as ultraHtml,
|
|
||||||
} from "ultrahtml";
|
|
||||||
import swap from "ultrahtml/transformers/swap";
|
|
||||||
import { parseScript } from "esprima";
|
import { parseScript } from "esprima";
|
||||||
import config from "../mcfly.config";
|
import config from "../mcfly.config";
|
||||||
|
|
||||||
|
@ -226,7 +217,6 @@ async function useFragments(html: string) {
|
||||||
}, {});
|
}, {});
|
||||||
const ast = parse(html);
|
const ast = parse(html);
|
||||||
|
|
||||||
// building fragment<name, text> map
|
|
||||||
for (const key in availableFragments) {
|
for (const key in availableFragments) {
|
||||||
let text: string = await useStorage().getItem(
|
let text: string = await useStorage().getItem(
|
||||||
"assets:components:" + key + ".html"
|
"assets:components:" + key + ".html"
|
||||||
|
@ -253,9 +243,6 @@ async function useFragments(html: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceSlots(fragmentNode, node) {
|
function replaceSlots(fragmentNode, node) {
|
||||||
// fragmentNode.children = fragmentNode.children.concat(node.children);
|
|
||||||
|
|
||||||
// walkSync find slot
|
|
||||||
walkSync(fragmentNode, (n) => {
|
walkSync(fragmentNode, (n) => {
|
||||||
if (n.type === ELEMENT_NODE && n.name === "slot") {
|
if (n.type === ELEMENT_NODE && n.name === "slot") {
|
||||||
console.log(n);
|
console.log(n);
|
||||||
|
|
Loading…
Reference in a new issue