add(examples/styles): color palette to showcase all available colors to render (except for .default)
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s

This commit is contained in:
2025-02-21 16:43:03 +01:00
parent 16724f6a52
commit c0c0590bb9
4 changed files with 110 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ pub fn build(b: *std.Build) void {
grid,
mixed,
// styles:
palette,
};
const example = b.option(Examples, "example", "Example to build and/or run. (default: vertical)") orelse .vertical;
@@ -96,6 +97,15 @@ pub fn build(b: *std.Build) void {
});
mixed.root_module.addImport("zterm", lib);
// styles:
const palette = b.addExecutable(.{
.name = "palette",
.root_source_file = b.path("examples/styles/palette.zig"),
.target = target,
.optimize = optimize,
});
palette.root_module.addImport("zterm", lib);
// mapping of user selected example to compile step
const exe = switch (example) {
// elements:
@@ -108,6 +118,7 @@ pub fn build(b: *std.Build) void {
.grid => grid,
.mixed => mixed,
// styles:
.palette => palette,
};
b.installArtifact(exe);