diff options
| author | Simen A. W. Olsen <hello@simenandre.no> | 2026-05-28 23:27:10 +0200 |
|---|---|---|
| committer | Simen A. W. Olsen <hello@simenandre.no> | 2026-05-28 23:27:10 +0200 |
| commit | 1eaf6a9d883a47444d0d68f4ab88bfba62c321d0 (patch) | |
| tree | a4ff9ee96580c8173620b1419537308367ebd399 /build.zig | |
| download | ziglang-docs-epub-1eaf6a9d883a47444d0d68f4ab88bfba62c321d0.tar.gz ziglang-docs-epub-1eaf6a9d883a47444d0d68f4ab88bfba62c321d0.zip | |
feat: add ziglang-docs-epub tool
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..4456d5e --- /dev/null +++ b/build.zig @@ -0,0 +1,33 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const exe = b.addExecutable(.{ + .name = "ziglang-docs-epub", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }), + }); + b.installArtifact(exe); + + const run = b.addRunArtifact(exe); + run.step.dependOn(b.getInstallStep()); + if (b.args) |args| run.addArgs(args); + const run_step = b.step("run", "Build EPUBs (optionally pass version filters)"); + run_step.dependOn(&run.step); + + const tests = b.addTest(.{ + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }), + }); + const run_tests = b.addRunArtifact(tests); + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_tests.step); +} |
