diff --git a/apps/site/components/Icons/InstallationMethod/Volta.tsx b/apps/site/components/Icons/InstallationMethod/Volta.tsx new file mode 100644 index 0000000000000..57880504f791e --- /dev/null +++ b/apps/site/components/Icons/InstallationMethod/Volta.tsx @@ -0,0 +1,34 @@ +import type { FC, SVGProps } from 'react'; + +const Volta: FC> = props => ( + + + + V + + +); + +export default Volta; diff --git a/apps/site/components/Icons/InstallationMethod/index.ts b/apps/site/components/Icons/InstallationMethod/index.ts index d7c980e0a219e..41c7897e2172f 100644 --- a/apps/site/components/Icons/InstallationMethod/index.ts +++ b/apps/site/components/Icons/InstallationMethod/index.ts @@ -4,5 +4,6 @@ import Docker from '@/components/Icons/InstallationMethod/Docker'; import FNM from '@/components/Icons/InstallationMethod/FNM'; import Homebrew from '@/components/Icons/InstallationMethod/Homebrew'; import NVM from '@/components/Icons/InstallationMethod/NVM'; +import Volta from '@/components/Icons/InstallationMethod/Volta'; -export default { Choco, Devbox, Docker, FNM, Homebrew, NVM }; +export default { Choco, Devbox, Docker, FNM, Homebrew, NVM, Volta }; diff --git a/apps/site/components/__design__/platform-logos.stories.tsx b/apps/site/components/__design__/platform-logos.stories.tsx index 1a6c77ebb282d..39d6b20c7534f 100644 --- a/apps/site/components/__design__/platform-logos.stories.tsx +++ b/apps/site/components/__design__/platform-logos.stories.tsx @@ -17,6 +17,7 @@ export const PlatformLogos: StoryObj = { +
diff --git a/apps/site/snippets/en/download/volta.bash b/apps/site/snippets/en/download/volta.bash new file mode 100644 index 0000000000000..b1978fe00a511 --- /dev/null +++ b/apps/site/snippets/en/download/volta.bash @@ -0,0 +1,11 @@ +# On most Unix systems including macOS, you can install with a single command: +${props.os === 'WIN' ? + 'winget install Volta.Volta' : + 'curl https://get.volta.sh | bash' +} + +# Download and install Node.js: +volta install node@${props.release.major} + +# Verify the Node.js version: +node -v # Should print "${props.release.versionWithPrefix}". diff --git a/apps/site/types/release.ts b/apps/site/types/release.ts index ec8333c75ea01..c5d050b05dfe5 100644 --- a/apps/site/types/release.ts +++ b/apps/site/types/release.ts @@ -5,6 +5,7 @@ import type { UserOS, UserPlatform } from '@/types/userOS'; export type InstallationMethod = | 'NVM' | 'FNM' + | 'VOLTA' | 'BREW' | 'DEVBOX' | 'DOCKER' diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index 09559ba7a761e..0c537fb0f69fb 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -34,6 +34,7 @@ export enum InstallationMethodLabel { CHOCO = 'Chocolatey', DEVBOX = 'Devbox', DOCKER = 'Docker', + VOLTA = 'Volta', } export enum PackageManagerLabel { @@ -209,6 +210,14 @@ export const INSTALL_METHODS: Array< url: 'https://docs.docker.com/get-started/get-docker/', info: 'layouts.download.codeBox.platformInfo.docker', }, + { + label: InstallationMethodLabel.VOLTA, + value: 'VOLTA', + compatibility: { os: ['WIN', 'MAC', 'LINUX'] }, + iconImage: , + url: 'https://docs.volta.sh/guide/getting-started', + info: 'layouts.download.codeBox.platformInfo.volta', + }, ]; export const PACKAGE_MANAGERS: Array< diff --git a/packages/i18n/locales/en.json b/packages/i18n/locales/en.json index a0a3f2b8238a3..cf9259c761797 100644 --- a/packages/i18n/locales/en.json +++ b/packages/i18n/locales/en.json @@ -284,7 +284,8 @@ "brew": "Homebrew is a package manager for macOS and Linux.", "choco": "Chocolatey is a package manager for Windows.", "devbox": "Devbox creates isolated, reproducible development environments.", - "docker": "Docker is a containerization platform." + "docker": "Docker is a containerization platform.", + "volta": "\"Volta\" is a cross-platform Node.js version manager." } } },