2022-03-10 09:41:48 -08:00
|
|
|
---
|
|
|
|
id: npm
|
|
|
|
title: npm
|
|
|
|
sidebar_label: NPM
|
|
|
|
---
|
|
|
|
|
|
|
|
## What
|
|
|
|
|
2022-05-04 16:46:06 -07:00
|
|
|
Display the currently active [npm][npm-docs] version.
|
2022-03-10 09:41:48 -08:00
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"type": "npm",
|
|
|
|
"style": "powerline",
|
|
|
|
"powerline_symbol": "\uE0B0",
|
|
|
|
"foreground": "#193549",
|
|
|
|
"background": "#ffeb3b",
|
2022-03-27 01:12:47 -07:00
|
|
|
"template": "\ue71e {{ .Full }} "
|
2022-03-10 09:41:48 -08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
|
|
|
``` template
|
|
|
|
\ue71e {{.Full}}
|
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
### Properties
|
|
|
|
|
|
|
|
- `.Full`: `string` - the full version
|
|
|
|
- `.Major`: `string` - major number
|
|
|
|
- `.Minor`: `string` - minor number
|
|
|
|
- `.Patch`: `string` - patch number
|
2022-05-12 03:40:17 -07:00
|
|
|
- `.URL`: `string` - URL of the version info / release notes
|
|
|
|
- `.Error`: `string` - error encountered when fetching the version string
|
2022-03-10 09:41:48 -08:00
|
|
|
|
2022-04-20 09:43:59 -07:00
|
|
|
[templates]: /docs/configuration/templates
|
2022-05-04 16:46:06 -07:00
|
|
|
[npm-docs]: https://docs.npmjs.com/about-npm
|