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
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
This commit is contained in:
11
build.zig
11
build.zig
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user