chore: add feature to build documentation
This commit is contained in:
parent
0af0295acf
commit
e67d98de86
10
build.zig
10
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".
|
// This will evaluate the `test` step rather than the default, which is "install".
|
||||||
const test_step = b.step("test", "Run library tests");
|
const test_step = b.step("test", "Run library tests");
|
||||||
test_step.dependOn(&run_main_tests.step);
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue