authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:43:00 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:43:00 -07:00
loge80729e3e6d208e97293c65f49424739af8902a1
tree61bd08bd2720d398aca8aa3e05a827c9579b7102
parentb6d8d9053373d09caf32873a1a376122c890c274

docs/tutorial- lowercase you


1 files changed, 8 insertions(+), 8 deletions(-)

docs/tutorial.md+8-8
......@@ -20,7 +20,7 @@ The wizard will also ask if you'd like it setup any additional metadata files su
2020---
2121## Understanding `zigmod.yml`
2222
23Running [`zigmod init`](./commands/init.md) will ask if You want to create an application or a library. Based on You answer the resulting `zigmod.yml` file have two types.
23Running [`zigmod init`](./commands/init.md) will ask if you want to create an application or a library. Based on you answer the resulting `zigmod.yml` file have two types.
2424
2525### `zigmod.yml` for an application (`id` is omitted)
2626
......@@ -32,7 +32,7 @@ root_dependencies:
3232 - src: git https://github.com/jecolon/ziglyph
3333```
3434
35In this case You can use `@import("ziglyph")` to import the package and use it.
35In this case you can use `@import("ziglyph")` to import the package and use it.
3636
3737### `zigmod.yml` for a library (`id` is omitted)
3838
......@@ -45,11 +45,11 @@ dependencies:
4545 - src: git https://github.com/jecolon/ziglyph
4646```
4747
48Here I assume that You initialized Your project with `zig init-exe` or `zig init-lib`, so Your `build.zig` the `addExecutable()` or `addStaticLibrary()` call points to `src/main.zig`.
48Here I assume that you initialized Your project with `zig init-exe` or `zig init-lib`, so Your `build.zig` the `addExecutable()` or `addStaticLibrary()` call points to `src/main.zig`.
4949
50In this case You can `@import("ziglyph")` in `src/lib.zig`, but not in `src/main.zig`. However You can `@import("my-package")` in `src/main.zig`.
50In this case you can `@import("ziglyph")` in `src/lib.zig`, but not in `src/main.zig`. However you can `@import("my-package")` in `src/main.zig`.
5151
52Please note, that using `zig init-exe` or `zig init-lib` for creating a project does not mean that You have to use `zigmod init` in application or library mode. Creating a `zigmod.yml` file with proper `name` and `main` only makes Your package importable by other projects. This is usually not needed with applications, but quite useful in case of libraries; hence the name.
52Please note, that using `zig init-exe` or `zig init-lib` for creating a project does not mean that you have to use `zigmod init` in application or library mode. Creating a `zigmod.yml` file with proper `name` and `main` only makes Your package importable by other projects. This is usually not needed with applications, but quite useful in case of libraries; hence the name.
5353
5454### Zig and Zigmod package handling explained
5555
......@@ -78,9 +78,9 @@ root (src/main.zig)
7878
7979It is very important to understand, that `my-package` is _below_ `root`, as `name/main` in `zigmod.yml` will create a separate package (it will not be chained to `root`).
8080
81If You want to use the dependencies from `root`, then make sure that Your `zigmod.yml` does _not_ contain a `main` line **and** use `root_dependencies` instead of `dependencies`. This is what `zigmod init` does in application mode.
81If you want to use the dependencies from `root`, then make sure that Your `zigmod.yml` does _not_ contain a `main` line **and** use `root_dependencies` instead of `dependencies`. This is what `zigmod init` does in application mode.
8282
83On the other hand using `root_dependencies` and `dependencies` is not mutually exclusive, You can take advantage of using both, like zigmod does. Using `dependencies` requires a proper `main` field in Your `zigmod.yml`.
83On the other hand using `root_dependencies` and `dependencies` is not mutually exclusive, you can take advantage of using both, like zigmod does. Using `dependencies` requires a proper `main` field in Your `zigmod.yml`.
8484
8585## Running `zigmod fetch`
8686This command will inspect your `zigmod.yml` and download any new dependencies as well as pulling updates for any ones already download. It will recursively do this for your entire tree until it is full constructed which will culminate in the generation of two output files: `deps.zig` and `zigmod.lock`.
......@@ -111,7 +111,7 @@ Add `--no-update` if you do want it to fetch remote updates and only regenerate
111111 exe.install();
112112```
113113
114> Note: If You would like to use the external dependencies in tests, do not forget to add `deps.addAllTo(main_tests)` after the `addTest()` call.
114> Note: If you would like to use the external dependencies in tests, do not forget to add `deps.addAllTo(main_tests)` after the `addTest()` call.
115115
116116---
117117## Adding a dependency