diff options
| author | 2019-11-27 23:13:31 +0900 | |
|---|---|---|
| committer | 2019-11-27 23:13:31 +0900 | |
| commit | a305e818bd986c599fff17141617bc4f890276cf (patch) | |
| tree | ff0a5c133c271d83de3e71ebc023ffc08bb1e3c9 /build.zig | |
| parent | Breaking: OsIterator will now get the exe on init (diff) | |
| download | zig-clap-a305e818bd986c599fff17141617bc4f890276cf.tar.gz zig-clap-a305e818bd986c599fff17141617bc4f890276cf.tar.xz zig-clap-a305e818bd986c599fff17141617bc4f890276cf.zip | |
Add clap.parse as the simplest way of using the lib
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -27,8 +27,9 @@ pub fn build(b: *Builder) void { | |||
| 27 | 27 | ||
| 28 | const example_step = b.step("examples", "Build examples"); | 28 | const example_step = b.step("examples", "Build examples"); |
| 29 | inline for ([_][]const u8{ | 29 | inline for ([_][]const u8{ |
| 30 | "simple", | ||
| 31 | //"simple-error", | ||
| 30 | "comptime-clap", | 32 | "comptime-clap", |
| 31 | //"comptime-clap-error", | ||
| 32 | "streaming-clap", | 33 | "streaming-clap", |
| 33 | "help", | 34 | "help", |
| 34 | }) |example_name| { | 35 | }) |example_name| { |
| @@ -61,9 +62,10 @@ fn readMeStep(b: *Builder) *std.build.Step { | |||
| 61 | const stream = &file.outStream().stream; | 62 | const stream = &file.outStream().stream; |
| 62 | try stream.print( | 63 | try stream.print( |
| 63 | @embedFile("example/README.md.template"), | 64 | @embedFile("example/README.md.template"), |
| 64 | @embedFile("example/streaming-clap.zig"), | 65 | @embedFile("example/simple.zig"), |
| 66 | @embedFile("example/simple-error.zig"), | ||
| 65 | @embedFile("example/comptime-clap.zig"), | 67 | @embedFile("example/comptime-clap.zig"), |
| 66 | @embedFile("example/comptime-clap-error.zig"), | 68 | @embedFile("example/streaming-clap.zig"), |
| 67 | @embedFile("example/help.zig"), | 69 | @embedFile("example/help.zig"), |
| 68 | ); | 70 | ); |
| 69 | } | 71 | } |