docs: fix doc build step

This commit is contained in:
Tim Culverhouse 2024-03-29 09:20:42 -05:00
parent 117545ca4b
commit 910fac9cc2

View file

@ -72,9 +72,15 @@ pub fn build(b: *std.Build) void {
b.default_step.dependOn(lints_step);
// Docs
const vaxis_docs = tests;
const docs = b.addStaticLibrary(.{
.name = "vaxis",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
docs.root_module.addImport("vaxis", vaxis_mod);
const build_docs = b.addInstallDirectory(.{
.source_dir = vaxis_docs.getEmittedDocs(),
.source_dir = docs.getEmittedDocs(),
.install_dir = .prefix,
.install_subdir = "docs",
});