diff options
| author | 2024-06-08 14:27:10 -0500 | |
|---|---|---|
| committer | 2024-06-09 07:41:59 +0200 | |
| commit | 7a51c11319b3892b81784149fb2cb2915073710c (patch) | |
| tree | ad7eb7d0760f1b87fecd808ea51f2ddca23ba52e | |
| parent | gitignore: Add new zig-cache folder (diff) | |
| download | zig-clap-7a51c11319b3892b81784149fb2cb2915073710c.tar.gz zig-clap-7a51c11319b3892b81784149fb2cb2915073710c.tar.xz zig-clap-7a51c11319b3892b81784149fb2cb2915073710c.zip | |
Add installation instructions to README
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | example/README.md.template | 15 |
2 files changed, 30 insertions, 0 deletions
| @@ -10,6 +10,21 @@ version of zig-clap that targets a specific Zig release, have a look | |||
| 10 | at the releases. Each release specifies the Zig version it compiles with | 10 | at the releases. Each release specifies the Zig version it compiles with |
| 11 | in the release notes. | 11 | in the release notes. |
| 12 | 12 | ||
| 13 | ## Installation | ||
| 14 | |||
| 15 | First, run the following: | ||
| 16 | |||
| 17 | ``` | ||
| 18 | zig fetch --save git+https://github.com/Hejsil/zig-clap | ||
| 19 | ``` | ||
| 20 | |||
| 21 | Then add the following to `build.zig`: | ||
| 22 | |||
| 23 | ```zig | ||
| 24 | const clap = b.dependency("clap", .{}); | ||
| 25 | exe.root_module.addImport("clap", clap.module("clap")); | ||
| 26 | ``` | ||
| 27 | |||
| 13 | ## Features | 28 | ## Features |
| 14 | 29 | ||
| 15 | * Short arguments `-a` | 30 | * Short arguments `-a` |
diff --git a/example/README.md.template b/example/README.md.template index b296ca3..87832ee 100644 --- a/example/README.md.template +++ b/example/README.md.template | |||
| @@ -10,6 +10,21 @@ version of zig-clap that targets a specific Zig release, have a look | |||
| 10 | at the releases. Each release specifies the Zig version it compiles with | 10 | at the releases. Each release specifies the Zig version it compiles with |
| 11 | in the release notes. | 11 | in the release notes. |
| 12 | 12 | ||
| 13 | ## Installation | ||
| 14 | |||
| 15 | First, run the following: | ||
| 16 | |||
| 17 | ``` | ||
| 18 | zig fetch --save git+https://github.com/Hejsil/zig-clap | ||
| 19 | ``` | ||
| 20 | |||
| 21 | Then add the following to `build.zig`: | ||
| 22 | |||
| 23 | ```zig | ||
| 24 | const clap = b.dependency("clap", .{{}}); | ||
| 25 | exe.root_module.addImport("clap", clap.module("clap")); | ||
| 26 | ``` | ||
| 27 | |||
| 13 | ## Features | 28 | ## Features |
| 14 | 29 | ||
| 15 | * Short arguments `-a` | 30 | * Short arguments `-a` |