aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig13
-rw-r--r--flake.nix2
2 files changed, 9 insertions, 6 deletions
diff --git a/build.zig b/build.zig
index 81b3db8..a805b17 100644
--- a/build.zig
+++ b/build.zig
@@ -125,13 +125,16 @@ pub fn build(b: *std.Build) void {
});
docs_step.dependOn(&docs_install.step);
- const hot_cmd = b.addSystemCommand(&.{
- "sh",
+ const dev_cmd = b.addSystemCommand(&.{
+ "watchexec",
+ "-r",
+ "-I",
"-c",
- "clear; echo 'building in hot mode'; find src -type f | entr -r zig build run",
+ "clear",
+ "zig build run",
});
- const hot_step = b.step("hot", "Run server in hot reload mode");
- hot_step.dependOn(&hot_cmd.step);
+ const dev_step = b.step("dev", "Run server in dev mode");
+ dev_step.dependOn(&dev_cmd.step);
run_cmd.step.dependOn(b.getInstallStep());
}
diff --git a/flake.nix b/flake.nix
index 92ff2d9..34db055 100644
--- a/flake.nix
+++ b/flake.nix
@@ -29,7 +29,7 @@
packages = [
pkgs.zig
pkgs.sqlite
- pkgs.entr
+ pkgs.watchexec
];
};
};