Add docs build in build.zig.
This commit is contained in:
parent
b6f0a71d1f
commit
dfc3a01645
1 changed files with 12 additions and 0 deletions
12
build.zig
12
build.zig
|
@ -54,4 +54,16 @@ pub fn build(b: *std.Build) void {
|
||||||
// running the unit tests.
|
// running the unit tests.
|
||||||
const test_step = b.step("test", "Run unit tests.");
|
const test_step = b.step("test", "Run unit tests.");
|
||||||
test_step.dependOn(&run_lib_unit_tests.step);
|
test_step.dependOn(&run_lib_unit_tests.step);
|
||||||
|
|
||||||
|
|
||||||
|
// Documentation generation.
|
||||||
|
const install_docs = b.addInstallDirectory(.{
|
||||||
|
.source_dir = lib.getEmittedDocs(),
|
||||||
|
.install_dir = .prefix,
|
||||||
|
.install_subdir = "docs",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Documentation generation step.
|
||||||
|
const docs_step = b.step("docs", "Emit documentation.");
|
||||||
|
docs_step.dependOn(&install_docs.step);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue