feat: code blocks beta

This commit is contained in:
obvTiger 2025-03-27 17:28:51 +01:00
parent 362b7aa15e
commit 1ecb6d8682
19 changed files with 756 additions and 94 deletions

View file

@ -51,18 +51,25 @@ class BlueprintCompiler {
const html = this.htmlGenerator.generateHTML(ast);
const css = this.cssGenerator.generateCSS();
const hasServerCode = this.htmlGenerator.hasServerCode();
const serverCode = hasServerCode ? this.htmlGenerator.generateServerCode() : '';
const headContent = this.metadataManager.generateHeadContent(baseName);
const finalHtml = this.htmlGenerator.generateFinalHtml(headContent, html);
if (this.options.debug) {
console.log("[DEBUG] Compilation completed successfully");
if (hasServerCode) {
console.log("[DEBUG] Server code generated");
}
}
return {
success: true,
html: finalHtml,
css: css,
hasServerCode: hasServerCode,
serverCode: serverCode,
errors: [],
};
} catch (error) {
@ -73,6 +80,8 @@ class BlueprintCompiler {
success: false,
html: null,
css: null,
hasServerCode: false,
serverCode: null,
errors: [
{
message: error.message,