docs: add a short description of available vpm commands (#9566)
parent
10619d098c
commit
3617ce0539
83
doc/docs.md
83
doc/docs.md
|
@ -100,6 +100,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h
|
||||||
* [Builtin functions](#builtin-functions)
|
* [Builtin functions](#builtin-functions)
|
||||||
* [Printing custom types](#printing-custom-types)
|
* [Printing custom types](#printing-custom-types)
|
||||||
* [Modules](#modules)
|
* [Modules](#modules)
|
||||||
|
* [Module/package management](#modulepackage-management)
|
||||||
* [Types 2](#types-2)
|
* [Types 2](#types-2)
|
||||||
* [Interfaces](#interfaces)
|
* [Interfaces](#interfaces)
|
||||||
* [Enums](#enums)
|
* [Enums](#enums)
|
||||||
|
@ -2049,6 +2050,88 @@ fn init() {
|
||||||
The `init` function cannot be public - it will be called automatically. This feature is
|
The `init` function cannot be public - it will be called automatically. This feature is
|
||||||
particularly useful for initializing a C library.
|
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
|
## Types 2
|
||||||
|
|
||||||
### Interfaces
|
### Interfaces
|
||||||
|
|
Loading…
Reference in New Issue