1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: add a short description of available vpm commands (#9566)

This commit is contained in:
koplenov 2021-04-05 23:07:15 +03:00 committed by GitHub
parent 10619d098c
commit 3617ce0539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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