build: add zine file watcher to build
This commit is contained in:
parent
01c65adce6
commit
ed043cb785
2 changed files with 13 additions and 0 deletions
|
|
@ -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
8
src/watcher/root.zig
Normal 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"),
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue