From 0cd47e12a64f5f195609c3fe95510ea1af59f7f4 Mon Sep 17 00:00:00 2001 From: Mike <154029656+mootoday@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:12:46 +0900 Subject: [PATCH] docs: add Devbox as commumity download option (#7370) * docs: add Devbox as commumity download option * Update apps/site/components/Icons/Platform/Devbox.tsx Co-authored-by: Michael Esteban Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com> * Update apps/site/components/Icons/Platform/Devbox.tsx Co-authored-by: Michael Esteban Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com> * chore: add Devbox platform icon story * Update apps/site/util/downloadUtils.tsx Co-authored-by: Augustin Mauroy Signed-off-by: Mike <154029656+mootoday@users.noreply.github.com> --------- Signed-off-by: @mootoday <154029656+mootoday@users.noreply.github.com> Signed-off-by: Mike <154029656+mootoday@users.noreply.github.com> Co-authored-by: Michael Esteban Co-authored-by: Augustin Mauroy --- .../Icons/InstallationMethod/Devbox.tsx | 21 +++++++++++++++++++ .../Icons/InstallationMethod/index.ts | 3 ++- .../__design__/platform-logos.stories.tsx | 1 + apps/site/snippets/en/download/devbox.bash | 14 +++++++++++++ apps/site/types/release.ts | 8 ++++++- apps/site/util/downloadUtils.tsx | 9 ++++++++ packages/i18n/locales/en.json | 1 + 7 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 apps/site/components/Icons/InstallationMethod/Devbox.tsx create mode 100644 apps/site/snippets/en/download/devbox.bash diff --git a/apps/site/components/Icons/InstallationMethod/Devbox.tsx b/apps/site/components/Icons/InstallationMethod/Devbox.tsx new file mode 100644 index 0000000000000..5f04deead0318 --- /dev/null +++ b/apps/site/components/Icons/InstallationMethod/Devbox.tsx @@ -0,0 +1,21 @@ +import type { FC, SVGProps } from 'react'; + +const Devbox: FC> = props => ( + + + +); + +export default Devbox; diff --git a/apps/site/components/Icons/InstallationMethod/index.ts b/apps/site/components/Icons/InstallationMethod/index.ts index 6e2a87de11aee..d7c980e0a219e 100644 --- a/apps/site/components/Icons/InstallationMethod/index.ts +++ b/apps/site/components/Icons/InstallationMethod/index.ts @@ -1,7 +1,8 @@ import Choco from '@/components/Icons/InstallationMethod/Choco'; +import Devbox from '@/components/Icons/InstallationMethod/Devbox'; 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'; -export default { Choco, Docker, FNM, Homebrew, NVM }; +export default { Choco, Devbox, Docker, FNM, Homebrew, NVM }; diff --git a/apps/site/components/__design__/platform-logos.stories.tsx b/apps/site/components/__design__/platform-logos.stories.tsx index 87c773c121066..1a6c77ebb282d 100644 --- a/apps/site/components/__design__/platform-logos.stories.tsx +++ b/apps/site/components/__design__/platform-logos.stories.tsx @@ -16,6 +16,7 @@ export const PlatformLogos: StoryObj = { +
diff --git a/apps/site/snippets/en/download/devbox.bash b/apps/site/snippets/en/download/devbox.bash new file mode 100644 index 0000000000000..791e40fb4c71c --- /dev/null +++ b/apps/site/snippets/en/download/devbox.bash @@ -0,0 +1,14 @@ +# Download and install Devbox +curl -fsSL https://get.jetify.com/devbox | bash + +# Initialize Devbox in your project +devbox init + +# Download and install Node.js: +devbox add node@${props.release.major} + +# Open a Devbox shell +devbox shell + +# 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 3ac64a633d340..ec8333c75ea01 100644 --- a/apps/site/types/release.ts +++ b/apps/site/types/release.ts @@ -2,7 +2,13 @@ import type { DownloadSnippet } from '@/types/downloads'; import type { NodeRelease } from '@/types/releases'; import type { UserOS, UserPlatform } from '@/types/userOS'; -export type InstallationMethod = 'NVM' | 'FNM' | 'BREW' | 'DOCKER' | 'CHOCO'; +export type InstallationMethod = + | 'NVM' + | 'FNM' + | 'BREW' + | 'DEVBOX' + | 'DOCKER' + | 'CHOCO'; export type PackageManager = 'NPM' | 'YARN' | 'PNPM'; // Items with a pipe/default value mean that they are auto inferred diff --git a/apps/site/util/downloadUtils.tsx b/apps/site/util/downloadUtils.tsx index 4720ed990a156..a01885b2e05c8 100644 --- a/apps/site/util/downloadUtils.tsx +++ b/apps/site/util/downloadUtils.tsx @@ -32,6 +32,7 @@ export enum InstallationMethodLabel { FNM = 'fnm', BREW = 'Brew', CHOCO = 'Chocolatey', + DEVBOX = 'Devbox', DOCKER = 'Docker', } @@ -182,6 +183,14 @@ export const INSTALL_METHODS: Array< url: 'https://brew.sh/', info: 'layouts.download.codeBox.platformInfo.brew', }, + { + label: InstallationMethodLabel.DEVBOX, + value: 'DEVBOX', + compatibility: { os: ['WIN', 'MAC', 'LINUX'] }, + iconImage: , + url: 'https://jetify.com/devbox/', + info: 'layouts.download.codeBox.platformInfo.devbox', + }, { label: InstallationMethodLabel.CHOCO, value: 'CHOCO', diff --git a/packages/i18n/locales/en.json b/packages/i18n/locales/en.json index 9f56b5c8fa6f9..fbff7014330a1 100644 --- a/packages/i18n/locales/en.json +++ b/packages/i18n/locales/en.json @@ -279,6 +279,7 @@ "fnm": "\"fnm\" is a cross-platform Node.js version manager.", "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." } }