Add first business article and article layout

This commit is contained in:
2026-05-21 12:14:46 -05:00
parent 200e14e2e9
commit 4735704c6f
9617 changed files with 988627 additions and 0 deletions

28
node_modules/astro/dist/vite-plugin-astro/utils.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
import fs from "node:fs/promises";
const frontmatterRE = /^---(.*?)^---/ms;
const RETURN_REPLACE_RE = /(\/\/[^\n]*|\/\*[\s\S]*?\*\/|`(?:[^`\\]|\\.)*`|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(?<!\.)\breturn(\s*;|\b)/g;
function replaceTopLevelReturns(code) {
return code.replace(RETURN_REPLACE_RE, (_match, skip, tail) => {
if (skip !== void 0) return skip;
return tail.trim() === ";" ? "throw 0;" : "throw ";
});
}
async function loadId(pluginContainer, id) {
const result = await pluginContainer.load(id, { ssr: true });
if (result) {
if (typeof result === "string") {
return result;
} else {
return result.code;
}
}
try {
return await fs.readFile(id, "utf-8");
} catch {
}
}
export {
frontmatterRE,
loadId,
replaceTopLevelReturns
};