add(examples/styles): text and color styling possiblities
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This also contains some minor refactoring to improve the readability and understandability of the library (i.e. renaming of Style.Attributes to Style.Emphasis).
This commit is contained in:
10
build.zig
10
build.zig
@@ -15,6 +15,7 @@ pub fn build(b: *std.Build) void {
|
||||
grid,
|
||||
mixed,
|
||||
// styles:
|
||||
text,
|
||||
palette,
|
||||
};
|
||||
|
||||
@@ -106,6 +107,14 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
palette.root_module.addImport("zterm", lib);
|
||||
|
||||
const text = b.addExecutable(.{
|
||||
.name = "text",
|
||||
.root_source_file = b.path("examples/styles/text.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
text.root_module.addImport("zterm", lib);
|
||||
|
||||
// mapping of user selected example to compile step
|
||||
const exe = switch (example) {
|
||||
// elements:
|
||||
@@ -118,6 +127,7 @@ pub fn build(b: *std.Build) void {
|
||||
.grid => grid,
|
||||
.mixed => mixed,
|
||||
// styles:
|
||||
.text => text,
|
||||
.palette => palette,
|
||||
};
|
||||
b.installArtifact(exe);
|
||||
|
||||
Reference in New Issue
Block a user