Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions apps/site/components/Icons/InstallationMethod/Volta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { FC, SVGProps } from 'react';

const Volta: FC<SVGProps<SVGSVGElement>> = props => (
<svg
width="32"
height="32"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<circle
cx="16"
cy="16"
r="15"
fill="#6DB9B4"
stroke="#5EA9A2"
strokeWidth="2"
/>
<text
x="16"
y="21"
fontFamily="Arial"
fontSize="16"
fontWeight="bold"
fill="#FFFFFF"
textAnchor="middle"
>
V
</text>
</svg>
);

export default Volta;
3 changes: 2 additions & 1 deletion apps/site/components/Icons/InstallationMethod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const PlatformLogos: StoryObj = {
<InstallMethodIcons.Homebrew width={64} height={64} />
<InstallMethodIcons.NVM width={64} height={64} />
<InstallMethodIcons.Devbox width={64} height={64} />
<InstallMethodIcons.Volta width={64} height={64} />
</div>
<div className="flex flex-col items-center gap-4">
<InstallMethodIcons.Choco width={64} height={64} />
Expand Down
11 changes: 11 additions & 0 deletions apps/site/snippets/en/download/volta.bash
Original file line number Diff line number Diff line change
@@ -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}".
1 change: 1 addition & 0 deletions apps/site/types/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { UserOS, UserPlatform } from '@/types/userOS';
export type InstallationMethod =
| 'NVM'
| 'FNM'
| 'VOLTA'
| 'BREW'
| 'DEVBOX'
| 'DOCKER'
Expand Down
9 changes: 9 additions & 0 deletions apps/site/util/downloadUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export enum InstallationMethodLabel {
CHOCO = 'Chocolatey',
DEVBOX = 'Devbox',
DOCKER = 'Docker',
VOLTA = 'Volta',
}

export enum PackageManagerLabel {
Expand Down Expand Up @@ -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: <InstallMethodIcons.Volta width={16} height={16} />,
url: 'https://docs.volta.sh/guide/getting-started',
info: 'layouts.download.codeBox.platformInfo.volta',
},
];

export const PACKAGE_MANAGERS: Array<
Expand Down
3 changes: 2 additions & 1 deletion packages/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
},
Expand Down
Loading