authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-31 15:46:50 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-31 15:46:50 -07:00
log8be6116dd04477d4f967c09bfe3c560b7f3da15b
tree0bcbab9558d8e2bd31f190499123c89829cb1243
parent3d8526ef25f3ff7df882aacdc19f4c9b8e1de472

docs/cmd/init- rewrite section to align with new behavior


1 files changed, 2 insertions(+), 16 deletions(-)

docs/commands/init.md+2-16
......@@ -1,23 +1,9 @@
11## `init` command
22```
3zigmod init [name] [entry_point]
3zigmod init
44```
55
6This command will generate a `zig.mod` file and place it in the current directory. `[name]` and `[entry_point]` can be used to override the default values. `[name]` defaults to the name of the current directory, optionally removing a `zig-` prefix from it. `[entry_point]` defaults to either `src/lib.zig` or `src/main.zig` in that order.
7
8The resulting file will look something like this:
9
10```yml
11id: e8bx53yvuyhaudzhvoh16bov9ond5a5tp1zk76aflwtwsea7
12name: hello
13main: src/main.zig
14dependencies:
15```
16
17- `id` is a randomly generated identifier that will uniquely identify your project coming from different versions or sources.
18- `name` is the string other developers will `@import` your package with.
19- `main` is the root Zig file of your package.
20- `dependencies` is a list that we'll add to later.
6This command will help you generate a `zig.mod` file and place it in the current directory. This is the main file that will define various pieces of metadata about your project and manage your dependencies. The command will guide you though a number of questions that help you setup supporting files as well such as `.gitignore` and `LICENSE`.
217
228Check out the [`zig.mod` reference](./../zig.mod.md) for more info.
239