From e12c0d23ad72ffa9389d90311453db535f57e450 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Mon, 4 Mar 2024 16:24:45 +0000 Subject: Prepare to move to zine static site generator instead of hugo https://zine-ssg.io/documentation/ --- converter/build.zig | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 converter/build.zig (limited to 'converter/build.zig') diff --git a/converter/build.zig b/converter/build.zig new file mode 100644 index 0000000..10f855a --- /dev/null +++ b/converter/build.zig @@ -0,0 +1,36 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const exe = b.addExecutable(.{ + .name = "converter", + .root_source_file = .{ .path = "src/main.zig" }, + .target = target, + .optimize = optimize, + }); + // const zig_yaml = b.dependency("zig-yaml", .{}); + // exe.root_module.addImport("yaml", zig_yaml.module("yaml")); + + b.installArtifact(exe); + + const run_cmd = b.addRunArtifact(exe); + run_cmd.step.dependOn(b.getInstallStep()); + + if (b.args) |args| { + run_cmd.addArgs(args); + } + const run_step = b.step("run", "Run the app"); + run_step.dependOn(&run_cmd.step); + + const exe_unit_tests = b.addTest(.{ + .root_source_file = .{ .path = "src/main.zig" }, + .target = target, + .optimize = optimize, + }); + + const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_exe_unit_tests.step); +} -- cgit v1.2.3-ZIG