Skip to content

Commit 0b2e7b6

Browse files
authored
feat: Added volta to package manager download dropdown (#7497)
* feat: Added volta to package manager download dropdown Fix #6832 * updated with volta logo * docs: updated volta docs instructions
1 parent 6fcbf5b commit 0b2e7b6

File tree

7 files changed

+60
-2
lines changed

7 files changed

+60
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { FC, SVGProps } from 'react';
2+
3+
const Volta: FC<SVGProps<SVGSVGElement>> = props => (
4+
<svg
5+
width="32"
6+
height="32"
7+
viewBox="0 0 32 32"
8+
fill="none"
9+
xmlns="http://www.w3.org/2000/svg"
10+
{...props}
11+
>
12+
<circle
13+
cx="16"
14+
cy="16"
15+
r="15"
16+
fill="#6DB9B4"
17+
stroke="#5EA9A2"
18+
strokeWidth="2"
19+
/>
20+
<text
21+
x="16"
22+
y="21"
23+
fontFamily="Arial"
24+
fontSize="16"
25+
fontWeight="bold"
26+
fill="#FFFFFF"
27+
textAnchor="middle"
28+
>
29+
V
30+
</text>
31+
</svg>
32+
);
33+
34+
export default Volta;

apps/site/components/Icons/InstallationMethod/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ import Docker from '@/components/Icons/InstallationMethod/Docker';
44
import FNM from '@/components/Icons/InstallationMethod/FNM';
55
import Homebrew from '@/components/Icons/InstallationMethod/Homebrew';
66
import NVM from '@/components/Icons/InstallationMethod/NVM';
7+
import Volta from '@/components/Icons/InstallationMethod/Volta';
78

8-
export default { Choco, Devbox, Docker, FNM, Homebrew, NVM };
9+
export default { Choco, Devbox, Docker, FNM, Homebrew, NVM, Volta };

apps/site/components/__design__/platform-logos.stories.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const PlatformLogos: StoryObj = {
1717
<InstallMethodIcons.Homebrew width={64} height={64} />
1818
<InstallMethodIcons.NVM width={64} height={64} />
1919
<InstallMethodIcons.Devbox width={64} height={64} />
20+
<InstallMethodIcons.Volta width={64} height={64} />
2021
</div>
2122
<div className="flex flex-col items-center gap-4">
2223
<InstallMethodIcons.Choco width={64} height={64} />
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# On most Unix systems including macOS, you can install with a single command:
2+
${props.os === 'WIN' ?
3+
'winget install Volta.Volta' :
4+
'curl https://get.volta.sh | bash'
5+
}
6+
7+
# Download and install Node.js:
8+
volta install node@${props.release.major}
9+
10+
# Verify the Node.js version:
11+
node -v # Should print "${props.release.versionWithPrefix}".

apps/site/types/release.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { UserOS, UserPlatform } from '@/types/userOS';
55
export type InstallationMethod =
66
| 'NVM'
77
| 'FNM'
8+
| 'VOLTA'
89
| 'BREW'
910
| 'DEVBOX'
1011
| 'DOCKER'

apps/site/util/downloadUtils.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export enum InstallationMethodLabel {
3434
CHOCO = 'Chocolatey',
3535
DEVBOX = 'Devbox',
3636
DOCKER = 'Docker',
37+
VOLTA = 'Volta',
3738
}
3839

3940
export enum PackageManagerLabel {
@@ -209,6 +210,14 @@ export const INSTALL_METHODS: Array<
209210
url: 'https://docs.docker.com/get-started/get-docker/',
210211
info: 'layouts.download.codeBox.platformInfo.docker',
211212
},
213+
{
214+
label: InstallationMethodLabel.VOLTA,
215+
value: 'VOLTA',
216+
compatibility: { os: ['WIN', 'MAC', 'LINUX'] },
217+
iconImage: <InstallMethodIcons.Volta width={16} height={16} />,
218+
url: 'https://docs.volta.sh/guide/getting-started',
219+
info: 'layouts.download.codeBox.platformInfo.volta',
220+
},
212221
];
213222

214223
export const PACKAGE_MANAGERS: Array<

packages/i18n/locales/en.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@
284284
"brew": "Homebrew is a package manager for macOS and Linux.",
285285
"choco": "Chocolatey is a package manager for Windows.",
286286
"devbox": "Devbox creates isolated, reproducible development environments.",
287-
"docker": "Docker is a containerization platform."
287+
"docker": "Docker is a containerization platform.",
288+
"volta": "\"Volta\" is a cross-platform Node.js version manager."
288289
}
289290
}
290291
},

0 commit comments

Comments
 (0)