Add version detection chapter to README

feature/lookup-installed v0.3.0
trivernis 1 year ago
parent a3605e4317
commit 76f712bd1b
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,6 +1,6 @@
[package]
name = "nenv"
version = "0.2.0"
version = "0.3.0"
edition = "2021"

@ -6,7 +6,7 @@ Node environment manager written in rust.
- Written in fast and safe rust
- Multiple active nodejs versions at the same time
- Configuration for project specific versions with the `engines.node` field in the package.json
- Configuration for project specific versions
- Version matching with semver expressions
## Installation
@ -55,6 +55,28 @@ nenv list-versions
```
## Version detection
The node version nenv uses is controlled by
1. The `engines.node` config field in the `package.json` which is parsed as a semver requirement.
```json
{
"name": "my project",
"engines": {
"node": "18"
}
}
```
2. The `.node-version` file in the current or parent directories which contains the version string.
```
19.4.0
```
3. The `NODE_VERSION` environment variable.
4. The default version set with `nenv default`.
## License
GPL-3.0
Loading…
Cancel
Save