mirror of
https://github.com/tj/n.git
synced 2024-11-21 18:48:57 +01:00
Add raw download instructions as another way of getting started
This commit is contained in:
parent
f6aa66a367
commit
e5b7cd3267
@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased] (date goes here)
|
||||
|
||||
### Added
|
||||
|
||||
- in README describe raw download of `n` to bootstrap install of node and npm
|
||||
|
||||
## [6.1.1] (2019-11-10)
|
||||
|
||||
### Fixed
|
||||
|
20
README.md
20
README.md
@ -29,12 +29,6 @@ Since you probably already have `node`, the easiest way to install `n` is throug
|
||||
|
||||
npm install -g n
|
||||
|
||||
Alternatively, you can clone this repo and
|
||||
|
||||
make install
|
||||
|
||||
to install `n` to `bin/n` of the directory specified in the environment variable `$PREFIX`, which defaults to `/usr/local` (note that you will likely need to use `sudo`). To install `n` in a custom location (such as `$CUSTOM_LOCATION/bin/n`), run `PREFIX=$CUSTOM_LOCATION make install`.
|
||||
|
||||
Once installed, `n` caches `node` versions in subdirectory `n/versions` of the directory specified in environment variable `N_PREFIX`, which defaults to `/usr/local`; and the _active_ `node` version is installed directly in `N_PREFIX`.
|
||||
|
||||
To avoid requiring `sudo` for `n` and `npm` global installs, it is suggested you either install to your home directory using `N_PREFIX`, or take ownership of the system directories:
|
||||
@ -45,6 +39,20 @@ To avoid requiring `sudo` for `n` and `npm` global installs, it is suggested you
|
||||
# take ownership of node install destination folders
|
||||
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
|
||||
|
||||
-----
|
||||
|
||||
If `npm` is not yet available, one way to bootstrap an install:
|
||||
|
||||
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
|
||||
bash n lts
|
||||
# Now node and npm are available
|
||||
|
||||
Alternatively, you can clone this repo and
|
||||
|
||||
make install
|
||||
|
||||
to install `n` to `bin/n` of the directory specified in the environment variable `$PREFIX`, which defaults to `/usr/local` (note that you will likely need to use `sudo`). To install `n` in a custom location (such as `$CUSTOM_LOCATION/bin/n`), run `PREFIX=$CUSTOM_LOCATION make install`.
|
||||
|
||||
### 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).
|
||||
|
Loading…
Reference in New Issue
Block a user