Skip to content

Commit

Permalink
download: restore preamble in download snippets
Browse files Browse the repository at this point in the history
See https://nodejs-hj4exhlax-openjs.vercel.app/en/download/package-manager (preview from #7323) for the previous version

See #7351 (comment) for removal context
  • Loading branch information
ljharb committed Dec 27, 2024
1 parent 2226f7a commit 27f3d29
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apps/site/snippets/en/download/brew.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# NOTE:
# Homebrew is not a Node.js package manager.
# Please ensure it is already installed on your system.
# Follow official instructions at https://brew.sh/
# Homebrew only supports installing major Node.js versions and might not support the latest Node.js version from the 22 release line.

# download and install Node.js
brew install node@${props.release.major}

Expand Down
6 changes: 6 additions & 0 deletions apps/site/snippets/en/download/choco.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# NOTE:
# Chocolatey is not a Node.js package manager.
# Please ensure it is already installed on your system.
# Follow official instructions at https://chocolatey.org/
# Chocolatey is not officially maintained by the Node.js project and might not support the v22.12.0 version of Node.js

# download and install Node.js
choco install nodejs-lts --version="${props.release.major}"

Expand Down
6 changes: 6 additions & 0 deletions apps/site/snippets/en/download/docker.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# NOTE:
# Docker is not a Node.js package manager.
# Please ensure it is already installed on your system.
# Follow official instructions at https://docs.docker.com/desktop/
# Docker images are provided officially at https://github.com/nodejs/docker-node/

# pulls the Node.js Docker image
docker pull node:${props.release.major}-${props.release.major >= 4 ? 'alpine' : 'slim'}

Expand Down
8 changes: 7 additions & 1 deletion apps/site/snippets/en/download/fnm.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# installs fnm (Fast Node Manager)
curl -fsSL https://fnm.vercel.app/install | bash

# activate fnm
source ~/.bashrc

# download and install Node.js
fnm install ${props.release.major}
fnm use --install-if-missing ${props.release.major}

# verifies the right Node.js version is in the environment
node -v # should print "${props.release.versionWithPrefix}"
Expand Down
3 changes: 3 additions & 0 deletions apps/site/snippets/en/download/nvm.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# download and install Node.js (you may need to restart the terminal)
nvm install ${props.release.major}

Expand Down

0 comments on commit 27f3d29

Please sign in to comment.