From e67d98de86d45278eeadf37db7319c7c3d2e566b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Sat, 2 Dec 2023 12:54:26 -0600 Subject: [PATCH] chore: add feature to build documentation --- build.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.zig b/build.zig index 72e5593..7bbafcc 100644 --- a/build.zig +++ b/build.zig @@ -46,4 +46,14 @@ pub fn build(b: *std.Build) void { // This will evaluate the `test` step rather than the default, which is "install". const test_step = b.step("test", "Run library tests"); test_step.dependOn(&run_main_tests.step); + + // Build Documentation + const doc = b.addInstallDirectory(.{ + .source_dir = lib.getEmittedDocs(), + .install_dir = .prefix, + .install_subdir = "docs", + }); + + const doc_step = b.step("doc", "Generate documentation"); + doc_step.dependOn(&doc.step); }