From 3617ce053944155a710db1923cf2d13e17fcb29e Mon Sep 17 00:00:00 2001 From: koplenov Date: Mon, 5 Apr 2021 23:07:15 +0300 Subject: [PATCH] docs: add a short description of available vpm commands (#9566) --- doc/docs.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/doc/docs.md b/doc/docs.md index 30fd138d1a..32ac6ffe63 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -100,6 +100,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h * [Builtin functions](#builtin-functions) * [Printing custom types](#printing-custom-types) * [Modules](#modules) + * [Module/package management](#modulepackage-management) * [Types 2](#types-2) * [Interfaces](#interfaces) * [Enums](#enums) @@ -2049,6 +2050,88 @@ fn init() { The `init` function cannot be public - it will be called automatically. This feature is particularly useful for initializing a C library. +### Module/package management + +Briefly: + +```powershell +v [module option] [param] +``` + +###### module option's: + +``` + 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. +``` + +Read more: + +You can also install modules already created by someone else with [VPM](https://vpm.vlang.io/): +```powershell +v install [module] +``` +###### Example: +```powershell +v install ui +``` + +For remove a module: + +```powershell +v remove [module] +``` +###### Example: +```powershell +v remove ui +``` + +For update an installed module from [VPM](https://vpm.vlang.io/): + +```powershell +v update [module] +``` +###### Example: +```powershell +v update ui +``` + +Or you can update all your modules: +```powershell +v update +``` + +To see all the modules you have installed, you can use: + +```powershell +v list +``` +###### Example +```powershell +> v list +Installed modules: + markdown + ui +``` + +To see all the modules you have installed, you can use: +outdated Show installed modules that need updates. +```powershell +v outdated +``` +###### Example +```powershell +> v outdated +Modules are up to date. +``` + +You can also add your module to VPM by following the instructions on the website https://vpm.vlang.io/new + ## Types 2 ### Interfaces