fix: flush static buffer in conditionals and correct helpers import path

- Flush static buffer at end of each conditional branch (if/else/else-if)
  to ensure content is rendered inside the correct blocks
- Add helpers_path parameter to zig_codegen.generate() for correct
  relative imports in nested directories (e.g., '../helpers.zig')
- Fix build.zig to use correct CLI path (src/tpl_compiler/main.zig)
- Export zig_codegen from root.zig for CLI module usage

Bump version to 0.3.11
This commit is contained in:
2026-01-30 22:53:20 +05:30
parent 5ce319b335
commit dd2191829d
9 changed files with 122 additions and 21 deletions

View File

@@ -18,7 +18,7 @@ pub fn build(b: *std.Build) void {
const cli_exe = b.addExecutable(.{
.name = "pug-compile",
.root_module = b.createModule(.{
.root_source_file = b.path("src/cli/main.zig"),
.root_source_file = b.path("src/tpl_compiler/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{