diff --git a/cmd/v/help/install.txt b/cmd/v/help/install.txt index 975a690d7f..d1b90d251f 100644 --- a/cmd/v/help/install.txt +++ b/cmd/v/help/install.txt @@ -1,14 +1,14 @@ Usage: - v install [MODULE...] - Installs each MODULE. + v install [PACKAGE...] + Installs each PACKAGE. - If no MODULEs, the modules listed in the `v.mod` file are installed instead. + If no PACKAGEs, the packages listed in the `v.mod` file are installed instead. Options: --vpm - [Default] Install from vpm --git - Install from git repository url --hg - Install from mercurial repository url - --once - Only install the module if it was not previously installed + --once - Only install the package if it was not previously installed -help - Show usage info. -v - Print more details about the performed operation. -server-url - When doing network operations, use this vpm server. Can be given multiple times. diff --git a/cmd/v/help/list.txt b/cmd/v/help/list.txt index 33e28f1717..8c54c23413 100644 --- a/cmd/v/help/list.txt +++ b/cmd/v/help/list.txt @@ -1,3 +1,3 @@ Usage: v list -List all installed modules. +List all installed packages. diff --git a/cmd/v/help/remove.txt b/cmd/v/help/remove.txt index 0c0284127d..129d6d89b8 100644 --- a/cmd/v/help/remove.txt +++ b/cmd/v/help/remove.txt @@ -1,7 +1,7 @@ Usage: - v remove [MODULE...] - Removes all listed MODULEs. - If no MODULE is provided, removes ALL installed modules. + v remove [PACKAGE...] + Removes all listed PACKAGEs. + If no PACKAGE is provided, removes ALL installed packages. Options: -help - Show usage info. diff --git a/cmd/v/help/update.txt b/cmd/v/help/update.txt index 4fa9a918ed..5c55719901 100644 --- a/cmd/v/help/update.txt +++ b/cmd/v/help/update.txt @@ -1,8 +1,8 @@ Usage: - v update [MODULE]... - Updates each MODULE. + v update [PACKAGE]... + Updates each PACKAGE. - With no MODULE, ALL installed modules are updated to their latest versions. + With no PACKAGE, ALL installed packages are updated to their latest versions. Options: -help - Show usage info. diff --git a/cmd/v/help/vpm.txt b/cmd/v/help/vpm.txt index 037084d35e..860fbf0a3d 100644 --- a/cmd/v/help/vpm.txt +++ b/cmd/v/help/vpm.txt @@ -1,8 +1,8 @@ Usage: - a) v install [MODULE...] - b) v update [MODULE...] - c) v remove [MODULE...] + a) v install [PACKAGE...] + b) v update [PACKAGE...] + c) v remove [PACKAGE...] d) v search KEYWORD[...] - e) v show [MODULE...] + e) v show [PACKAGE...] You can also pass -h or --help after each vpm command from the above, to see more details about it. diff --git a/doc/docs.md b/doc/docs.md index d74dfa5686..879a15668d 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -133,7 +133,7 @@ To do so, run the command `v up`. * [v shader](#v-shader) * [Profiling](#profiling) * [Package Management](#package-management) - * [module options](#module-options) + * [Package options](#package-options) * [Publish package](#publish-package) * [Advanced Topics](#advanced-topics) * [Memory-unsafe code](#memory-unsafe-code) @@ -4800,32 +4800,34 @@ fn main() { ## Package management +Module consists of single folder. Package consists of multiple modules. + ```powershell -v [module option] [param] +v [package option] [param] ``` -### module options +### Package options ``` - install Install a module from VPM. - remove Remove a module that was installed from VPM. - search Search for a module from VPM. - update Update an installed module from VPM. - upgrade Upgrade all the outdated modules. - list List all installed modules. - outdated Show installed modules that need updates. + install Install a package from VPM. + remove Remove a package that was installed from VPM. + search Search for a package from VPM. + update Update an installed package from VPM. + upgrade Upgrade all the outdated packages. + list List all installed packages. + outdated Show installed packages that need updates. ``` -You can install modules already created by someone else with [VPM](https://vpm.vlang.io/): +You can install packages already created by someone else with [VPM](https://vpm.vlang.io/): ```powershell -v install [module] +v install [package] ``` **Example:** ```powershell v install ui ``` -Modules can be installed directly from git or mercurial repositories. +Packages can be installed directly from git or mercurial repositories. ```powershell v install [--once] [--git|--hg] [url] ``` @@ -4837,35 +4839,35 @@ v install --git https://github.com/vlang/markdown Sometimes you may want to install the dependencies **ONLY** if those are not installed: ``` -v install --once [module] +v install --once [package] ``` -Removing a module with v: +Removing a package with v: ```powershell -v remove [module] +v remove [package] ``` **Example:** ```powershell v remove ui ``` -Updating an installed module from [VPM](https://vpm.vlang.io/): +Updating an installed package from [VPM](https://vpm.vlang.io/): ```powershell -v update [module] +v update [package] ``` **Example:** ```powershell v update ui ``` -Or you can update all your modules: +Or you can update all your packages: ```powershell v update ``` -To see all the modules you have installed, you can use: +To see all the packages you have installed, you can use: ```powershell v list @@ -4873,29 +4875,29 @@ v list **Example:** ```powershell > v list -Installed modules: +Installed packages: markdown ui ``` -To see all the modules that need updates: +To see all the packages that need updates: ```powershell v outdated ``` **Example:** ```powershell > v outdated -Modules are up to date. +Package are up to date. ``` ### Publish package -1. Put a `v.mod` file inside the toplevel folder of your module (if you - created your module with the command `v new mymodule` or `v init` you already have a v.mod file). +1. Put a `v.mod` file inside the toplevel folder of your package (if you + created your package with the command `v new mypackage` or `v init` you already have a v.mod file). ```sh - v new mymodule - Input your project description: My nice module. + v new mypackage + Input your project description: My nice package. Input your project version: (0.0.0) 0.0.1 Input your project license: (MIT) Initialising ... @@ -4905,8 +4907,8 @@ Modules are up to date. Example `v.mod`: ```v ignore Module { - name: 'mymodule' - description: 'My nice module.' + name: 'mypackage' + description: 'My nice package.' version: '0.0.1' license: 'MIT' dependencies: [] @@ -4916,13 +4918,13 @@ Modules are up to date. Minimal file structure: ``` v.mod - mymodule.v + mypackage.v ``` - The name of your module should be used with the `module` directive - at the top of all files in your module. For `mymodule.v`: + The name of your package should be used with the `module` directive + at the top of all files in your package. For `mypackage.v`: ```v - module mymodule + module mypackage pub fn hello_world() { println('Hello World!') @@ -4939,16 +4941,16 @@ Modules are up to date. 3. Create a public repository on github.com. 4. Connect your local repository to the remote repository and push the changes. -5. Add your module to the public V module registry VPM: +5. Add your package to the public V package registry VPM: https://vpm.vlang.io/new - You will have to login with your Github account to register the module. + You will have to login with your Github account to register the package. **Warning:** _Currently it is not possible to edit your entry after submitting. - Check your module name and github url twice as this cannot be changed by you later._ -6. The final module name is a combination of your github account and - the module name you provided e.g. `mygithubname.mymodule`. + Check your package name and github url twice as this cannot be changed by you later._ +6. The final package name is a combination of your github account and + the package name you provided e.g. `mygithubname.mypackage`. -**Optional:** tag your V module with `vlang` and `vlang-module` on github.com +**Optional:** tag your V package with `vlang` and `vlang-package` on github.com to allow for a better search experience. # Advanced Topics