From 8be6116dd04477d4f967c09bfe3c560b7f3da15b Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sat, 31 Jul 2021 15:46:50 -0700 Subject: [PATCH] docs/cmd/init- rewrite section to align with new behavior --- docs/commands/init.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/docs/commands/init.md b/docs/commands/init.md index dbfd3c92e43ef32566c185bf032322ea6b58f7c6..65f224484ec578e9bc23ba7b937a4f7d5e1410b9 100644 --- a/docs/commands/init.md +++ b/docs/commands/init.md @@ -1,23 +1,9 @@ ## `init` command ``` -zigmod init [name] [entry_point] +zigmod init ``` -This 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. - -The resulting file will look something like this: - -```yml -id: e8bx53yvuyhaudzhvoh16bov9ond5a5tp1zk76aflwtwsea7 -name: hello -main: src/main.zig -dependencies: -``` - -- `id` is a randomly generated identifier that will uniquely identify your project coming from different versions or sources. -- `name` is the string other developers will `@import` your package with. -- `main` is the root Zig file of your package. -- `dependencies` is a list that we'll add to later. +This 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`. Check out the [`zig.mod` reference](./../zig.mod.md) for more info. -- 2.54.0