diff --git a/data.js b/data.js index 7f26c91..da8042b 100644 --- a/data.js +++ b/data.js @@ -132,10 +132,7 @@ const typst_header = `#import "template/template.typ": * skibidi `; -async function generate_zip() { - let assets_zip = await fetch("template.zip"); - let out_zip = await new JSZip().loadAsync(await assets_zip.blob()); - +function generate_template() { let out = typst_header; for(const step_key in steps) { @@ -180,7 +177,14 @@ async function generate_zip() { console.log(out); - out_zip.file("thesis.typ", out); + return out; +} + +async function generate_zip() { + let assets_zip = await fetch("template.zip"); + let out_zip = await new JSZip().loadAsync(await assets_zip.blob()); + + out_zip.file("thesis.typ", generate_template()); return await out_zip.generateAsync({ type: "blob" }); }