build: add zine file watcher to build

This commit is contained in:
CJ van den Berg 2025-11-29 12:32:23 +01:00
parent 01c65adce6
commit ed043cb785
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 13 additions and 0 deletions

View file

@ -339,6 +339,10 @@ pub fn build_exe(
});
const syntax_mod = syntax_dep.module("syntax");
const watcher_mod = b.createModule(.{
.root_source_file = b.path("src/watcher/root.zig"),
});
const help_mod = b.createModule(.{
.root_source_file = b.path("help.md"),
});
@ -421,6 +425,7 @@ pub fn build_exe(
.{ .name = "thespian", .module = thespian_mod },
.{ .name = "vaxis", .module = vaxis_mod },
.{ .name = "file_type_config", .module = file_type_config_mod },
.{ .name = "watcher", .module = watcher_mod },
},
});

8
src/watcher/root.zig Normal file
View file

@ -0,0 +1,8 @@
const builtin = @import("builtin");
pub const Watcher = switch (builtin.target.os.tag) {
.linux => @import("serve/watcher/LinuxWatcher.zig"),
.macos => @import("serve/watcher/MacosWatcher.zig"),
.windows => @import("serve/watcher/WindowsWatcher.zig"),
else => @compileError("unsupported platform"),
};