mirror of
https://github.com/tj/n.git
synced 2024-11-24 19:46:56 +01:00
Add homebrew to CHANGELOG, add third part header in README, fix header levels
This commit is contained in:
parent
c2256a194a
commit
6efc962265
@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased] (date goes here)
|
||||
|
||||
### Added
|
||||
|
||||
- install instruction using homebrew (macOS)
|
||||
|
||||
### Fixed
|
||||
|
||||
- lts lookup on node mirrors which don't purge old versions (e.g. taobao) [#512][]
|
||||
|
14
README.md
14
README.md
@ -26,20 +26,22 @@ to install `n` to `bin/n` of the directory specified in the environment variable
|
||||
Once installed, `n` installs `node` versions to subdirectory `n/versions` of the directory specified in environment variable `N_PREFIX`, which defaults to `/usr/local`; the _active_ `node`/`iojs` version is installed directly in `N_PREFIX`.
|
||||
To change the default to, say, `$HOME`, prefix later calls to `n` with `N_PREFIX=$HOME ` or add `export N_PREFIX=$HOME` to your shell initialization file.
|
||||
|
||||
On macOS with [Homebrew](https://brew.sh/) you can install the [`n` formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/n.rb). Does not require installing `node` first.
|
||||
### Third Party Installers
|
||||
|
||||
On macOS with [Homebrew](https://brew.sh/) you can install the [`n` formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/n.rb).
|
||||
|
||||
brew install n
|
||||
|
||||
Additionally, consider third-party installer [n-install](https://github.com/mklement0/n-install), which allows installation directly from GitHub; for instance,
|
||||
On Linux and macOS, [n-install](https://github.com/mklement0/n-install) allows installation directly from GitHub; for instance:
|
||||
|
||||
curl -L https://git.io/n-install | bash
|
||||
|
||||
sets both `PREFIX` and `N_PREFIX` to `$HOME/n`, installs `n` to `$HOME/n/bin`, modifies the initialization files of supported shells to export `N_PREFIX` and add `$HOME/n/bin` to the `PATH`, and installs the latest stable `node` version.
|
||||
n-install sets both `PREFIX` and `N_PREFIX` to `$HOME/n`, installs `n` to `$HOME/n/bin`, modifies the initialization files of supported shells to export `N_PREFIX` and add `$HOME/n/bin` to the `PATH`, and installs the latest stable `node` version.
|
||||
|
||||
|
||||
As a result, both `n` itself and all `node` versions it manages are hosted inside a single, optionally configurable directory, which you can later remove with the included `n-uninstall` script. `n-update` updates `n` itself to the latest version. See the [n-install repo](https://github.com/mklement0/n-install) for more details.
|
||||
|
||||
### Installing/Activating Versions
|
||||
## Installing/Activating Node Versions
|
||||
|
||||
Simply execute `n <version>` to install a version of `node`. If `<version>` has already been installed (via `n`), `n` will activate that version.
|
||||
A leading v is optional, and a partial version number installs the newest matching version.
|
||||
@ -65,7 +67,7 @@ Use or install the latest LTS official release:
|
||||
|
||||
$ n lts
|
||||
|
||||
### Removing Versions
|
||||
## Removing Versions
|
||||
|
||||
Remove some versions:
|
||||
|
||||
@ -81,7 +83,7 @@ Removing all versions except the current version:
|
||||
$ n prune
|
||||
```
|
||||
|
||||
### Binary Usage
|
||||
## Binary Usage
|
||||
|
||||
When running multiple versions of `node`, we can target
|
||||
them directly by asking `n` for the binary path:
|
||||
|
Loading…
Reference in New Issue
Block a user