2026-01-24 23:53:19 +05:30
|
|
|
// Pugz - A Pug-like HTML template engine written in Zig
|
|
|
|
|
//
|
|
|
|
|
// Quick Start:
|
|
|
|
|
// const pugz = @import("pugz");
|
|
|
|
|
// const engine = pugz.ViewEngine.init(.{ .views_dir = "views" });
|
|
|
|
|
// const html = try engine.render(allocator, "index", .{ .title = "Home" });
|
|
|
|
|
|
|
|
|
|
pub const pug = @import("pug.zig");
|
2026-01-17 18:50:16 +05:30
|
|
|
pub const view_engine = @import("view_engine.zig");
|
2026-01-24 23:53:19 +05:30
|
|
|
pub const template = @import("template.zig");
|
2026-01-25 15:23:57 +05:30
|
|
|
pub const parser = @import("parser.zig");
|
2026-01-28 17:01:28 +05:30
|
|
|
pub const mixin = @import("mixin.zig");
|
|
|
|
|
pub const runtime = @import("runtime.zig");
|
|
|
|
|
pub const codegen = @import("codegen.zig");
|
2026-01-28 22:54:23 +05:30
|
|
|
pub const compile_tpls = @import("compile_tpls.zig");
|
2026-01-17 18:32:29 +05:30
|
|
|
|
2026-01-24 23:53:19 +05:30
|
|
|
// Re-export main types
|
2026-01-17 18:50:16 +05:30
|
|
|
pub const ViewEngine = view_engine.ViewEngine;
|
2026-01-24 23:53:19 +05:30
|
|
|
pub const compile = pug.compile;
|
|
|
|
|
pub const compileFile = pug.compileFile;
|
|
|
|
|
pub const render = pug.render;
|
|
|
|
|
pub const renderFile = pug.renderFile;
|
|
|
|
|
pub const CompileOptions = pug.CompileOptions;
|
|
|
|
|
pub const CompileResult = pug.CompileResult;
|
|
|
|
|
pub const CompileError = pug.CompileError;
|
|
|
|
|
|
|
|
|
|
// Convenience function for inline templates with data
|
|
|
|
|
pub const renderTemplate = template.renderWithData;
|
2026-01-28 17:01:28 +05:30
|
|
|
|
2026-01-28 22:54:23 +05:30
|
|
|
// Build step convenience exports
|
|
|
|
|
pub const addCompileStep = compile_tpls.addCompileStep;
|
|
|
|
|
pub const CompileTplsOptions = compile_tpls.CompileOptions;
|