chore: add feature to build documentation

This commit is contained in:
Rekai Nyangadzayi Musuka 2023-12-02 12:54:26 -06:00
parent 0af0295acf
commit e67d98de86
1 changed files with 10 additions and 0 deletions

View File

@ -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);
}