diff options
| author | Rosa <rosaontheweb@proton.me> | 2026-05-27 02:56:07 -0400 |
|---|---|---|
| committer | Rosa <rosaontheweb@proton.me> | 2026-05-27 02:56:07 -0400 |
| commit | f175552dcd86cda7a7fcafc1db211084fabd65a0 (patch) | |
| tree | 48139b2e960f05517d9e175f463a38ab95cd57f1 /build.zig | |
| parent | 7f58741cfea43780fcd8702afffeaea6cd322029 (diff) | |
actually did a bit of writing
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -2,18 +2,10 @@ const std = @import("std"); const webgen = @import("webgen"); pub fn build(b: *std.Build) void { - const generate_html = b.addExecutable(.{ - .name = "generate_html", - .root_module = b.createModule(.{ - .root_source_file = b.path("util/generate_html.zig"), - .target = b.graph.host, - }), - }); - - const run_generate_html = b.addRunArtifact(generate_html); - run_generate_html.setCwd(b.path("")); // make sure we always run from buildroot + const run_webgen = webgen.installHtmlStep(b); + run_webgen.addDirectoryArg(b.path("src")); const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); - bundle_html.step.dependOn(&run_generate_html.step); + bundle_html.step.dependOn(&run_webgen.step); b.getInstallStep().dependOn(&bundle_html.step); const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" }); @@ -23,6 +15,4 @@ pub fn build(b: *std.Build) void { const publish_to_prod = b.step("publish", "Publish the website to production"); publish_to_prod.dependOn(b.getInstallStep()); - - b.getInstallStep().dependOn(&webgen.installHtmlStep(b).step); } |
