Changes
1 changed files (+25/-0)
-
-
@@ -33,6 +33,31 @@ .optimize = optimize,}); test_step.dependOn(&b.addRunArtifact(unit_tests).step); // API Docs { const subdir = b.option( []const u8, "docs-dir", "Subdirectory to install docs into. Default is \"docs/api\"", ) orelse "docs/api"; const lib = b.addStaticLibrary(.{ .name = "moo", .root_source_file = b.path("src/lib.zig"), .target = target, .optimize = .Debug, }); const install_docs = b.addInstallDirectory(.{ .source_dir = lib.getEmittedDocs(), .install_dir = .prefix, .install_subdir = subdir, }); const step = b.step("docs", "Install API docs into $prefix/$docs-dir"); step.dependOn(&install_docs.step); } // Zig example // This is not a command due to steps can't trigger lazy dependencies' fetching. // <https://github.com/ziglang/zig/issues/21525>
-